MeVisLab Toolbox Reference
mlDcmDRTRTROIIdentificationCodeSequenceInterface.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
4//
5// NOTE:
6// This file has been generated automatically by
7// FMEwork/ReleaseMeVis/Configuration/CodeGenerators/dcmtkToMLConverter/convertDcmtkToML.py
8// using the template file
9// FMEwork/ReleaseMeVis/Configuration/CodeGenerators/dcmtkToMLConverter/MLDcmtkAccessoriesNew/templates/DcmSequenceInterface.h
10//
11// Destination project:
12// FMEwork/ReleaseMeVis/Sources/Shared/MLDcmtkAccessoriesNew/DcmSequenceInterfaces
13//
14//----------------------------------------------------------------------------------
16
21//----------------------------------------------------------------------------------
22
23#ifndef __mlDcmDRTRTROIIdentificationCodeSequenceInterface_H
24#define __mlDcmDRTRTROIIdentificationCodeSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTRTROIIdentificationCodeSequenceInterface.h" //DRTRTROIIdentificationCodeSequence
31
32
33// ML includes
34#ifndef __mlModuleIncludes_H
35#include "mlModuleIncludes.h"
36#endif
37
39
40// ------------------------------------------------------------------
42// ------------------------------------------------------------------
44{
45 public:
46
48 {
49 public:
50
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
52
54
55 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
56
57 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
58
59 virtual ~Item() {}
60
61 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
62
63 bool isValid() const { return _dcmItem.get() != nullptr; }
64
65
66 // CodeMeaning (0008,0104) vr=LO, vm=1, type=1C
67 bool getCodeMeaning(std::string& parameter) const;
68 std::string getCodeMeaningTag() const { return "(0008,0104)"; }
69 bool setCodeMeaning(std::string parameter);
70
71 // CodeValue (0008,0100) vr=SH, vm=1, type=1C
72 bool getCodeValue(std::string& parameter) const;
73 std::string getCodeValueTag() const { return "(0008,0100)"; }
74 bool setCodeValue(std::string parameter);
75
76 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1C
77 bool getCodingSchemeDesignator(std::string& parameter) const;
78 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
79 bool setCodingSchemeDesignator(std::string parameter);
80
81 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=1C
82 bool getCodingSchemeVersion(std::string& parameter) const;
83 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
84 bool setCodingSchemeVersion(std::string parameter);
85
86 // ContextGroupExtensionCreatorUID (0008,010d) vr=UI, vm=1, type=1C
87 bool getContextGroupExtensionCreatorUID(std::string& parameter) const;
88 std::string getContextGroupExtensionCreatorUIDTag() const { return "(0008,010d)"; }
89 bool setContextGroupExtensionCreatorUID(std::string parameter);
90
91 // ContextGroupExtensionFlag (0008,010b) vr=CS, vm=1, type=3
92 bool getContextGroupExtensionFlag(std::string& parameter) const;
93 std::string getContextGroupExtensionFlagTag() const { return "(0008,010b)"; }
94 bool setContextGroupExtensionFlag(std::string parameter);
95
96 // ContextGroupLocalVersion (0008,0107) vr=DT, vm=1, type=1C
97 bool getContextGroupLocalVersion(std::string& parameter) const;
98 std::string getContextGroupLocalVersionTag() const { return "(0008,0107)"; }
99 bool setContextGroupLocalVersion(std::string parameter);
100
101 // ContextGroupVersion (0008,0106) vr=DT, vm=1, type=1C
102 bool getContextGroupVersion(std::string& parameter) const;
103 std::string getContextGroupVersionTag() const { return "(0008,0106)"; }
104 bool setContextGroupVersion(std::string parameter);
105
106 // ContextIdentifier (0008,010f) vr=CS, vm=1, type=3
107 bool getContextIdentifier(std::string& parameter) const;
108 std::string getContextIdentifierTag() const { return "(0008,010f)"; }
109 bool setContextIdentifier(std::string parameter);
110
111 // MappingResource (0008,0105) vr=CS, vm=1, type=1C
112 bool getMappingResource(std::string& parameter) const;
113 std::string getMappingResourceTag() const { return "(0008,0105)"; }
114 bool setMappingResource(std::string parameter);
115
116
117 private:
118
119 DCMTree::TreePtr _dcmItem;
120
121 };
122
124
126 DcmDRTRTROIIdentificationCodeSequenceInterface(std::vector<DcmDRTRTROIIdentificationCodeSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
127
134
137 // CodeMeaning (0008,0104) vr=LO, vm=1, type=1C
138 bool getCodeMeaning(unsigned long idx, std::string& parameter) const;
139 bool getCodeMeaning(DCMTree::TreePtr item, std::string& parameter) const;
140 std::string getCodeMeaningTag() const { return "(0008,0104)"; }
141 bool setCodeMeaning(unsigned long idx, std::string parameter);
142
143 // CodeValue (0008,0100) vr=SH, vm=1, type=1C
144 bool getCodeValue(unsigned long idx, std::string& parameter) const;
145 bool getCodeValue(DCMTree::TreePtr item, std::string& parameter) const;
146 std::string getCodeValueTag() const { return "(0008,0100)"; }
147 bool setCodeValue(unsigned long idx, std::string parameter);
148
149 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1C
150 bool getCodingSchemeDesignator(unsigned long idx, std::string& parameter) const;
151 bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string& parameter) const;
152 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
153 bool setCodingSchemeDesignator(unsigned long idx, std::string parameter);
154
155 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=1C
156 bool getCodingSchemeVersion(unsigned long idx, std::string& parameter) const;
157 bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string& parameter) const;
158 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
159 bool setCodingSchemeVersion(unsigned long idx, std::string parameter);
160
161 // ContextGroupExtensionCreatorUID (0008,010d) vr=UI, vm=1, type=1C
162 bool getContextGroupExtensionCreatorUID(unsigned long idx, std::string& parameter) const;
163 bool getContextGroupExtensionCreatorUID(DCMTree::TreePtr item, std::string& parameter) const;
164 std::string getContextGroupExtensionCreatorUIDTag() const { return "(0008,010d)"; }
165 bool setContextGroupExtensionCreatorUID(unsigned long idx, std::string parameter);
166
167 // ContextGroupExtensionFlag (0008,010b) vr=CS, vm=1, type=3
168 bool getContextGroupExtensionFlag(unsigned long idx, std::string& parameter) const;
169 bool getContextGroupExtensionFlag(DCMTree::TreePtr item, std::string& parameter) const;
170 std::string getContextGroupExtensionFlagTag() const { return "(0008,010b)"; }
171 bool setContextGroupExtensionFlag(unsigned long idx, std::string parameter);
172
173 // ContextGroupLocalVersion (0008,0107) vr=DT, vm=1, type=1C
174 bool getContextGroupLocalVersion(unsigned long idx, std::string& parameter) const;
175 bool getContextGroupLocalVersion(DCMTree::TreePtr item, std::string& parameter) const;
176 std::string getContextGroupLocalVersionTag() const { return "(0008,0107)"; }
177 bool setContextGroupLocalVersion(unsigned long idx, std::string parameter);
178
179 // ContextGroupVersion (0008,0106) vr=DT, vm=1, type=1C
180 bool getContextGroupVersion(unsigned long idx, std::string& parameter) const;
181 bool getContextGroupVersion(DCMTree::TreePtr item, std::string& parameter) const;
182 std::string getContextGroupVersionTag() const { return "(0008,0106)"; }
183 bool setContextGroupVersion(unsigned long idx, std::string parameter);
184
185 // ContextIdentifier (0008,010f) vr=CS, vm=1, type=3
186 bool getContextIdentifier(unsigned long idx, std::string& parameter) const;
187 bool getContextIdentifier(DCMTree::TreePtr item, std::string& parameter) const;
188 std::string getContextIdentifierTag() const { return "(0008,010f)"; }
189 bool setContextIdentifier(unsigned long idx, std::string parameter);
190
191 // MappingResource (0008,0105) vr=CS, vm=1, type=1C
192 bool getMappingResource(unsigned long idx, std::string& parameter) const;
193 bool getMappingResource(DCMTree::TreePtr item, std::string& parameter) const;
194 std::string getMappingResourceTag() const { return "(0008,0105)"; }
195 bool setMappingResource(unsigned long idx, std::string parameter);
196
197
200 void setSequence(std::vector<DcmDRTRTROIIdentificationCodeSequenceInterface::Item> dcmSequence) {
201 _itemVec = dcmSequence;
202 }
203
206 std::vector<DcmDRTRTROIIdentificationCodeSequenceInterface::Item> getSequence() const {
207 return _itemVec;
208 }
209
212 bool hasSequence() const {
213 return (_itemVec.size() != 0);
214 }
215
219 return static_cast<MLint>(_itemVec.size());
220 }
221
225 if (_itemVec.size() > idx) {
226 return _itemVec[idx];
227 }
229 }
230
235 return _itemVec[_itemVec.size()-1];
236 }
237
241
244 bool insertItem(const size_t idx) {
245 if (_itemVec.size() > idx) {
246 std::vector<DcmDRTRTROIIdentificationCodeSequenceInterface::Item>::iterator it = _itemVec.begin();
247 std::advance(it, idx);
249 return true;
250 }
251 return false;
252 }
253
256 bool removeItem(const size_t idx) {
257 if ( _itemVec.size() > idx ) {
258 std::vector<DcmDRTRTROIIdentificationCodeSequenceInterface::Item>::iterator it = _itemVec.begin();
259 std::advance(it, idx);
260 _itemVec.erase(it);
261 return true;
262 }
263 return false;
264 }
265
266 protected:
268 std::vector<DcmDRTRTROIIdentificationCodeSequenceInterface::Item> _itemVec;
269};
270
272
273#endif // __mlDcmDRTRTROIIdentificationCodeSequenceInterface_H
274
275/* MeVis-Hidden-Components-Start */
276/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getContextGroupExtensionCreatorUID(std::string &parameter) const
bool getCodingSchemeDesignator(std::string &parameter) const
bool setContextGroupExtensionCreatorUID(std::string parameter)
bool getContextGroupVersion(std::string &parameter) const
bool getMappingResource(std::string &parameter) const
bool getContextIdentifier(std::string &parameter) const
bool getCodeMeaning(std::string &parameter) const
bool getContextGroupExtensionFlag(std::string &parameter) const
bool getCodeValue(std::string &parameter) const
bool getCodingSchemeVersion(std::string &parameter) const
bool getContextGroupLocalVersion(std::string &parameter) const
Class to provide access to DRTRTROIIdentificationCodeSequence.
bool getContextGroupLocalVersion(DCMTree::TreePtr item, std::string &parameter) const
bool setCodingSchemeDesignator(unsigned long idx, std::string parameter)
bool getContextGroupExtensionCreatorUID(unsigned long idx, std::string &parameter) const
bool getCodeMeaning(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTRTROIIdentificationCodeSequenceInterface::Item newItem)
bool getCodingSchemeVersion(unsigned long idx, std::string &parameter) const
bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupExtensionCreatorUID(DCMTree::TreePtr item, std::string &parameter) const
bool getContextIdentifier(unsigned long idx, std::string &parameter) const
bool setCodeValue(unsigned long idx, std::string parameter)
bool getCodingSchemeDesignator(unsigned long idx, std::string &parameter) const
bool getContextGroupLocalVersion(unsigned long idx, std::string &parameter) const
DcmDRTRTROIIdentificationCodeSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string &parameter) const
void setSequence(std::vector< DcmDRTRTROIIdentificationCodeSequenceInterface::Item > dcmSequence)
Set the DRTRTROIIdentificationCodeSequence this interface class provides access to.
bool setCodingSchemeVersion(unsigned long idx, std::string parameter)
bool getCodeValue(DCMTree::TreePtr item, std::string &parameter) const
bool setCodeMeaning(unsigned long idx, std::string parameter)
bool getMappingResource(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupExtensionFlag(unsigned long idx, std::string &parameter) const
bool setContextGroupExtensionFlag(unsigned long idx, std::string parameter)
DcmDRTRTROIIdentificationCodeSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setMappingResource(unsigned long idx, std::string parameter)
bool getContextGroupVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupExtensionFlag(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTRTROIIdentificationCodeSequenceInterface::Item > getSequence() const
Return the DRTRTROIIdentificationCodeSequence this interface class provides access to.
bool getContextGroupVersion(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setContextGroupExtensionCreatorUID(unsigned long idx, std::string parameter)
DcmDRTRTROIIdentificationCodeSequenceInterface(std::vector< DcmDRTRTROIIdentificationCodeSequenceInterface::Item > dcmSequence)
Default Constructor.
bool setContextGroupLocalVersion(unsigned long idx, std::string parameter)
bool getCodeValue(unsigned long idx, std::string &parameter) const
bool setContextGroupVersion(unsigned long idx, std::string parameter)
bool getCodeMeaning(DCMTree::TreePtr item, std::string &parameter) const
bool getMappingResource(unsigned long idx, std::string &parameter) const
bool setContextIdentifier(unsigned long idx, std::string parameter)
std::vector< DcmDRTRTROIIdentificationCodeSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getContextIdentifier(DCMTree::TreePtr item, std::string &parameter) const
bool hasSequence() const
Check if the DRTRTROIIdentificationCodeSequence is set.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
Class collecting some DICOM helper functionality explicitly for dcmtk.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition mlTypeDefs.h:490
std::vector< TreePtr > TreePtrVector
a vector of TreePtr - used for sequences
Definition DCMTree_Lib.h:85
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition DCMTree_Lib.h:72