MeVisLab Toolbox Reference
mlDcmDRTBreedRegistrationSequenceInterface.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 __mlDcmDRTBreedRegistrationSequenceInterface_H
24#define __mlDcmDRTBreedRegistrationSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTBreedRegistrationSequenceInterface.h" //DRTBreedRegistrationSequence
31#include "mlDcmDRTBreedRegistryCodeSequenceInterface.h" //DRTBreedRegistryCodeSequence
32
33
34// ML includes
35#ifndef __mlModuleIncludes_H
36#include "mlModuleIncludes.h"
37#endif
38
40
41// ------------------------------------------------------------------
43// ------------------------------------------------------------------
45{
46 public:
47
49 {
50 public:
51
52 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
53
55
56 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
57
58 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
59
60 virtual ~Item() {}
61
62 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
63
64 bool isValid() const { return _dcmItem.get() != nullptr; }
65
66
67 // BreedRegistrationNumber (0010,2295) vr=LO, vm=1, type=1
68 bool getBreedRegistrationNumber(std::string& parameter) const;
69 std::string getBreedRegistrationNumberTag() const { return "(0010,2295)"; }
70 bool setBreedRegistrationNumber(std::string parameter);
71
72 // CodeMeaning (0008,0104) vr=LO, vm=1, type=1C
73 bool getCodeMeaning(std::string& parameter) const;
74 std::string getCodeMeaningTag() const { return "(0008,0104)"; }
75 bool setCodeMeaning(std::string parameter);
76
77 // CodeValue (0008,0100) vr=SH, vm=1, type=1C
78 bool getCodeValue(std::string& parameter) const;
79 std::string getCodeValueTag() const { return "(0008,0100)"; }
80 bool setCodeValue(std::string parameter);
81
82 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1C
83 bool getCodingSchemeDesignator(std::string& parameter) const;
84 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
85 bool setCodingSchemeDesignator(std::string parameter);
86
87 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=1C
88 bool getCodingSchemeVersion(std::string& parameter) const;
89 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
90 bool setCodingSchemeVersion(std::string parameter);
91
92 // ContextGroupExtensionCreatorUID (0008,010d) vr=UI, vm=1, type=1C
93 bool getContextGroupExtensionCreatorUID(std::string& parameter) const;
94 std::string getContextGroupExtensionCreatorUIDTag() const { return "(0008,010d)"; }
95 bool setContextGroupExtensionCreatorUID(std::string parameter);
96
97 // ContextGroupExtensionFlag (0008,010b) vr=CS, vm=1, type=3
98 bool getContextGroupExtensionFlag(std::string& parameter) const;
99 std::string getContextGroupExtensionFlagTag() const { return "(0008,010b)"; }
100 bool setContextGroupExtensionFlag(std::string parameter);
101
102 // ContextGroupLocalVersion (0008,0107) vr=DT, vm=1, type=1C
103 bool getContextGroupLocalVersion(std::string& parameter) const;
104 std::string getContextGroupLocalVersionTag() const { return "(0008,0107)"; }
105 bool setContextGroupLocalVersion(std::string parameter);
106
107 // ContextGroupVersion (0008,0106) vr=DT, vm=1, type=1C
108 bool getContextGroupVersion(std::string& parameter) const;
109 std::string getContextGroupVersionTag() const { return "(0008,0106)"; }
110 bool setContextGroupVersion(std::string parameter);
111
112 // ContextIdentifier (0008,010f) vr=CS, vm=1, type=3
113 bool getContextIdentifier(std::string& parameter) const;
114 std::string getContextIdentifierTag() const { return "(0008,010f)"; }
115 bool setContextIdentifier(std::string parameter);
116
117 // MappingResource (0008,0105) vr=CS, vm=1, type=1C
118 bool getMappingResource(std::string& parameter) const;
119 std::string getMappingResourceTag() const { return "(0008,0105)"; }
120 bool setMappingResource(std::string parameter);
121
122 // BreedRegistryCodeSequence (0010,2296) vr=SQ, vm=1, type=1
124 std::string getBreedRegistryCodeSequenceTag() const { return std::string("(0010,2296)"); }
126
127
128 private:
129
130 DCMTree::TreePtr _dcmItem;
131
132 };
133
135
137 DcmDRTBreedRegistrationSequenceInterface(std::vector<DcmDRTBreedRegistrationSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
138
145
148 // BreedRegistrationNumber (0010,2295) vr=LO, vm=1, type=1
149 bool getBreedRegistrationNumber(unsigned long idx, std::string& parameter) const;
150 bool getBreedRegistrationNumber(DCMTree::TreePtr item, std::string& parameter) const;
151 std::string getBreedRegistrationNumberTag() const { return "(0010,2295)"; }
152 bool setBreedRegistrationNumber(unsigned long idx, std::string parameter);
153
154 // CodeMeaning (0008,0104) vr=LO, vm=1, type=1C
155 bool getCodeMeaning(unsigned long idx, std::string& parameter) const;
156 bool getCodeMeaning(DCMTree::TreePtr item, std::string& parameter) const;
157 std::string getCodeMeaningTag() const { return "(0008,0104)"; }
158 bool setCodeMeaning(unsigned long idx, std::string parameter);
159
160 // CodeValue (0008,0100) vr=SH, vm=1, type=1C
161 bool getCodeValue(unsigned long idx, std::string& parameter) const;
162 bool getCodeValue(DCMTree::TreePtr item, std::string& parameter) const;
163 std::string getCodeValueTag() const { return "(0008,0100)"; }
164 bool setCodeValue(unsigned long idx, std::string parameter);
165
166 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1C
167 bool getCodingSchemeDesignator(unsigned long idx, std::string& parameter) const;
168 bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string& parameter) const;
169 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
170 bool setCodingSchemeDesignator(unsigned long idx, std::string parameter);
171
172 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=1C
173 bool getCodingSchemeVersion(unsigned long idx, std::string& parameter) const;
174 bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string& parameter) const;
175 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
176 bool setCodingSchemeVersion(unsigned long idx, std::string parameter);
177
178 // ContextGroupExtensionCreatorUID (0008,010d) vr=UI, vm=1, type=1C
179 bool getContextGroupExtensionCreatorUID(unsigned long idx, std::string& parameter) const;
180 bool getContextGroupExtensionCreatorUID(DCMTree::TreePtr item, std::string& parameter) const;
181 std::string getContextGroupExtensionCreatorUIDTag() const { return "(0008,010d)"; }
182 bool setContextGroupExtensionCreatorUID(unsigned long idx, std::string parameter);
183
184 // ContextGroupExtensionFlag (0008,010b) vr=CS, vm=1, type=3
185 bool getContextGroupExtensionFlag(unsigned long idx, std::string& parameter) const;
186 bool getContextGroupExtensionFlag(DCMTree::TreePtr item, std::string& parameter) const;
187 std::string getContextGroupExtensionFlagTag() const { return "(0008,010b)"; }
188 bool setContextGroupExtensionFlag(unsigned long idx, std::string parameter);
189
190 // ContextGroupLocalVersion (0008,0107) vr=DT, vm=1, type=1C
191 bool getContextGroupLocalVersion(unsigned long idx, std::string& parameter) const;
192 bool getContextGroupLocalVersion(DCMTree::TreePtr item, std::string& parameter) const;
193 std::string getContextGroupLocalVersionTag() const { return "(0008,0107)"; }
194 bool setContextGroupLocalVersion(unsigned long idx, std::string parameter);
195
196 // ContextGroupVersion (0008,0106) vr=DT, vm=1, type=1C
197 bool getContextGroupVersion(unsigned long idx, std::string& parameter) const;
198 bool getContextGroupVersion(DCMTree::TreePtr item, std::string& parameter) const;
199 std::string getContextGroupVersionTag() const { return "(0008,0106)"; }
200 bool setContextGroupVersion(unsigned long idx, std::string parameter);
201
202 // ContextIdentifier (0008,010f) vr=CS, vm=1, type=3
203 bool getContextIdentifier(unsigned long idx, std::string& parameter) const;
204 bool getContextIdentifier(DCMTree::TreePtr item, std::string& parameter) const;
205 std::string getContextIdentifierTag() const { return "(0008,010f)"; }
206 bool setContextIdentifier(unsigned long idx, std::string parameter);
207
208 // MappingResource (0008,0105) vr=CS, vm=1, type=1C
209 bool getMappingResource(unsigned long idx, std::string& parameter) const;
210 bool getMappingResource(DCMTree::TreePtr item, std::string& parameter) const;
211 std::string getMappingResourceTag() const { return "(0008,0105)"; }
212 bool setMappingResource(unsigned long idx, std::string parameter);
213
214 // BreedRegistryCodeSequence (0010,2296) vr=SQ, vm=1, type=1
216 std::string getBreedRegistryCodeSequenceTag() const { return std::string("(0010,2296)"); }
218
219
222 void setSequence(std::vector<DcmDRTBreedRegistrationSequenceInterface::Item> dcmSequence) {
223 _itemVec = dcmSequence;
224 }
225
228 std::vector<DcmDRTBreedRegistrationSequenceInterface::Item> getSequence() const {
229 return _itemVec;
230 }
231
234 bool hasSequence() const {
235 return (_itemVec.size() != 0);
236 }
237
241 return static_cast<MLint>(_itemVec.size());
242 }
243
247 if (_itemVec.size() > idx) {
248 return _itemVec[idx];
249 }
251 }
252
257 return _itemVec[_itemVec.size()-1];
258 }
259
263
266 bool insertItem(const size_t idx) {
267 if (_itemVec.size() > idx) {
268 std::vector<DcmDRTBreedRegistrationSequenceInterface::Item>::iterator it = _itemVec.begin();
269 std::advance(it, idx);
271 return true;
272 }
273 return false;
274 }
275
278 bool removeItem(const size_t idx) {
279 if ( _itemVec.size() > idx ) {
280 std::vector<DcmDRTBreedRegistrationSequenceInterface::Item>::iterator it = _itemVec.begin();
281 std::advance(it, idx);
282 _itemVec.erase(it);
283 return true;
284 }
285 return false;
286 }
287
288 protected:
290 std::vector<DcmDRTBreedRegistrationSequenceInterface::Item> _itemVec;
291};
292
294
295#endif // __mlDcmDRTBreedRegistrationSequenceInterface_H
296
297/* MeVis-Hidden-Components-Start */
298/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getCodingSchemeVersion(std::string &parameter) const
bool setBreedRegistrationNumber(std::string parameter)
bool setContextIdentifier(std::string parameter)
bool setCodingSchemeDesignator(std::string parameter)
bool getContextIdentifier(std::string &parameter) const
bool setCodingSchemeVersion(std::string parameter)
bool setContextGroupExtensionCreatorUID(std::string parameter)
bool getBreedRegistrationNumber(std::string &parameter) const
bool getContextGroupExtensionFlag(std::string &parameter) const
bool getContextGroupVersion(std::string &parameter) const
bool getContextGroupLocalVersion(std::string &parameter) const
bool setContextGroupVersion(std::string parameter)
void setBreedRegistryCodeSequence(DcmDRTBreedRegistryCodeSequenceInterface seq)
bool getContextGroupExtensionCreatorUID(std::string &parameter) const
DcmDRTBreedRegistryCodeSequenceInterface getBreedRegistryCodeSequence() const
bool setContextGroupLocalVersion(std::string parameter)
bool setContextGroupExtensionFlag(std::string parameter)
bool getMappingResource(std::string &parameter) const
bool getCodeMeaning(std::string &parameter) const
bool getCodingSchemeDesignator(std::string &parameter) const
bool getCodeValue(std::string &parameter) const
Class to provide access to DRTBreedRegistrationSequence.
bool getCodingSchemeVersion(unsigned long idx, std::string &parameter) const
bool getContextGroupExtensionFlag(unsigned long idx, std::string &parameter) const
DcmDRTBreedRegistryCodeSequenceInterface getBreedRegistryCodeSequence(unsigned long idx) const
bool setCodingSchemeDesignator(unsigned long idx, std::string parameter)
bool getMappingResource(DCMTree::TreePtr item, std::string &parameter) const
bool getBreedRegistrationNumber(DCMTree::TreePtr item, std::string &parameter) const
void setSequence(std::vector< DcmDRTBreedRegistrationSequenceInterface::Item > dcmSequence)
Set the DRTBreedRegistrationSequence this interface class provides access to.
bool setMappingResource(unsigned long idx, std::string parameter)
bool getCodeValue(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupExtensionCreatorUID(unsigned long idx, std::string &parameter) const
bool setBreedRegistrationNumber(unsigned long idx, std::string parameter)
bool setCodingSchemeVersion(unsigned long idx, std::string parameter)
bool getBreedRegistrationNumber(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
void setBreedRegistryCodeSequence(DcmDRTBreedRegistryCodeSequenceInterface seq, unsigned long idx)
bool getCodingSchemeDesignator(unsigned long idx, std::string &parameter) const
bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string &parameter) const
bool setCodeValue(unsigned long idx, std::string parameter)
bool setContextIdentifier(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
void addItem(DcmDRTBreedRegistrationSequenceInterface::Item newItem)
bool setContextGroupVersion(unsigned long idx, std::string parameter)
DcmDRTBreedRegistrationSequenceInterface::Item & addItem()
Adds a new item to the sequence.
std::vector< DcmDRTBreedRegistrationSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setContextGroupExtensionFlag(unsigned long idx, std::string parameter)
bool getContextGroupVersion(unsigned long idx, std::string &parameter) const
bool setContextGroupLocalVersion(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTBreedRegistrationSequence is set.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTBreedRegistrationSequenceInterface(std::vector< DcmDRTBreedRegistrationSequenceInterface::Item > dcmSequence)
Default Constructor.
std::vector< DcmDRTBreedRegistrationSequenceInterface::Item > getSequence() const
Return the DRTBreedRegistrationSequence this interface class provides access to.
bool getContextGroupVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupLocalVersion(unsigned long idx, std::string &parameter) const
bool getCodeValue(unsigned long idx, std::string &parameter) const
bool getContextGroupLocalVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getMappingResource(unsigned long idx, std::string &parameter) const
bool getContextGroupExtensionFlag(DCMTree::TreePtr item, std::string &parameter) const
bool setCodeMeaning(unsigned long idx, std::string parameter)
bool getCodeMeaning(DCMTree::TreePtr item, std::string &parameter) const
bool getContextIdentifier(unsigned long idx, std::string &parameter) const
DcmDRTBreedRegistrationSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getContextGroupExtensionCreatorUID(DCMTree::TreePtr item, std::string &parameter) const
bool setContextGroupExtensionCreatorUID(unsigned long idx, std::string parameter)
bool getCodeMeaning(unsigned long idx, std::string &parameter) const
bool getContextIdentifier(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTBreedRegistryCodeSequence.
Class to provide access to DRTBreedRegistryCodeSequence.
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