MeVisLab Toolbox Reference
mlDcmDRTReferencedImageSequenceInterface.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 __mlDcmDRTReferencedImageSequenceInterface_H
24#define __mlDcmDRTReferencedImageSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTReferencedImageSequenceInterface.h" //DRTReferencedImageSequence
31#include "mlDcmDRTPurposeOfReferenceCodeSequenceInterface.h" //DRTPurposeOfReferenceCodeSequence
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 // CodeMeaning (0008,0104) vr=LO, vm=1, type=1C
68 bool getCodeMeaning(std::string& parameter) const;
69 std::string getCodeMeaningTag() const { return "(0008,0104)"; }
70 bool setCodeMeaning(std::string parameter);
71
72 // CodeValue (0008,0100) vr=SH, vm=1, type=1C
73 bool getCodeValue(std::string& parameter) const;
74 std::string getCodeValueTag() const { return "(0008,0100)"; }
75 bool setCodeValue(std::string parameter);
76
77 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1C
78 bool getCodingSchemeDesignator(std::string& parameter) const;
79 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
80 bool setCodingSchemeDesignator(std::string parameter);
81
82 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=1C
83 bool getCodingSchemeVersion(std::string& parameter) const;
84 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
85 bool setCodingSchemeVersion(std::string parameter);
86
87 // ContextGroupExtensionCreatorUID (0008,010d) vr=UI, vm=1, type=1C
88 bool getContextGroupExtensionCreatorUID(std::string& parameter) const;
89 std::string getContextGroupExtensionCreatorUIDTag() const { return "(0008,010d)"; }
90 bool setContextGroupExtensionCreatorUID(std::string parameter);
91
92 // ContextGroupExtensionFlag (0008,010b) vr=CS, vm=1, type=3
93 bool getContextGroupExtensionFlag(std::string& parameter) const;
94 std::string getContextGroupExtensionFlagTag() const { return "(0008,010b)"; }
95 bool setContextGroupExtensionFlag(std::string parameter);
96
97 // ContextGroupLocalVersion (0008,0107) vr=DT, vm=1, type=1C
98 bool getContextGroupLocalVersion(std::string& parameter) const;
99 std::string getContextGroupLocalVersionTag() const { return "(0008,0107)"; }
100 bool setContextGroupLocalVersion(std::string parameter);
101
102 // ContextGroupVersion (0008,0106) vr=DT, vm=1, type=1C
103 bool getContextGroupVersion(std::string& parameter) const;
104 std::string getContextGroupVersionTag() const { return "(0008,0106)"; }
105 bool setContextGroupVersion(std::string parameter);
106
107 // ContextIdentifier (0008,010f) vr=CS, vm=1, type=3
108 bool getContextIdentifier(std::string& parameter) const;
109 std::string getContextIdentifierTag() const { return "(0008,010f)"; }
110 bool setContextIdentifier(std::string parameter);
111
112 // MappingResource (0008,0105) vr=CS, vm=1, type=1C
113 bool getMappingResource(std::string& parameter) const;
114 std::string getMappingResourceTag() const { return "(0008,0105)"; }
115 bool setMappingResource(std::string parameter);
116
117 // ReferencedFrameNumber (0008,1160) vr=IS, vm=1-n, type=1C
118 bool getReferencedFrameNumber(std::string& parameter) const;
119 std::string getReferencedFrameNumberTag() const { return "(0008,1160)"; }
120 bool setReferencedFrameNumber(std::string parameter);
121
122 // ReferencedSOPClassUID (0008,1150) vr=UI, vm=1, type=1
123 bool getReferencedSOPClassUID(std::string& parameter) const;
124 std::string getReferencedSOPClassUIDTag() const { return "(0008,1150)"; }
125 bool setReferencedSOPClassUID(std::string parameter);
126
127 // ReferencedSOPInstanceUID (0008,1155) vr=UI, vm=1, type=1
128 bool getReferencedSOPInstanceUID(std::string& parameter) const;
129 std::string getReferencedSOPInstanceUIDTag() const { return "(0008,1155)"; }
130 bool setReferencedSOPInstanceUID(std::string parameter);
131
132 // ReferencedSegmentNumber (0062,000b) vr=US, vm=1-n, type=1C
133 bool getReferencedSegmentNumber(MLuint16& parameter) const;
134 std::string getReferencedSegmentNumberTag() const { return "(0062,000b)"; }
136
137 // PurposeOfReferenceCodeSequence (0040,a170) vr=SQ, vm=1, type=3
139 std::string getPurposeOfReferenceCodeSequenceTag() const { return std::string("(0040,a170)"); }
141
142
143 private:
144
145 DCMTree::TreePtr _dcmItem;
146
147 };
148
150
152 DcmDRTReferencedImageSequenceInterface(std::vector<DcmDRTReferencedImageSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
153
160
163 // CodeMeaning (0008,0104) vr=LO, vm=1, type=1C
164 bool getCodeMeaning(unsigned long idx, std::string& parameter) const;
165 bool getCodeMeaning(DCMTree::TreePtr item, std::string& parameter) const;
166 std::string getCodeMeaningTag() const { return "(0008,0104)"; }
167 bool setCodeMeaning(unsigned long idx, std::string parameter);
168
169 // CodeValue (0008,0100) vr=SH, vm=1, type=1C
170 bool getCodeValue(unsigned long idx, std::string& parameter) const;
171 bool getCodeValue(DCMTree::TreePtr item, std::string& parameter) const;
172 std::string getCodeValueTag() const { return "(0008,0100)"; }
173 bool setCodeValue(unsigned long idx, std::string parameter);
174
175 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1C
176 bool getCodingSchemeDesignator(unsigned long idx, std::string& parameter) const;
177 bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string& parameter) const;
178 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
179 bool setCodingSchemeDesignator(unsigned long idx, std::string parameter);
180
181 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=1C
182 bool getCodingSchemeVersion(unsigned long idx, std::string& parameter) const;
183 bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string& parameter) const;
184 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
185 bool setCodingSchemeVersion(unsigned long idx, std::string parameter);
186
187 // ContextGroupExtensionCreatorUID (0008,010d) vr=UI, vm=1, type=1C
188 bool getContextGroupExtensionCreatorUID(unsigned long idx, std::string& parameter) const;
189 bool getContextGroupExtensionCreatorUID(DCMTree::TreePtr item, std::string& parameter) const;
190 std::string getContextGroupExtensionCreatorUIDTag() const { return "(0008,010d)"; }
191 bool setContextGroupExtensionCreatorUID(unsigned long idx, std::string parameter);
192
193 // ContextGroupExtensionFlag (0008,010b) vr=CS, vm=1, type=3
194 bool getContextGroupExtensionFlag(unsigned long idx, std::string& parameter) const;
195 bool getContextGroupExtensionFlag(DCMTree::TreePtr item, std::string& parameter) const;
196 std::string getContextGroupExtensionFlagTag() const { return "(0008,010b)"; }
197 bool setContextGroupExtensionFlag(unsigned long idx, std::string parameter);
198
199 // ContextGroupLocalVersion (0008,0107) vr=DT, vm=1, type=1C
200 bool getContextGroupLocalVersion(unsigned long idx, std::string& parameter) const;
201 bool getContextGroupLocalVersion(DCMTree::TreePtr item, std::string& parameter) const;
202 std::string getContextGroupLocalVersionTag() const { return "(0008,0107)"; }
203 bool setContextGroupLocalVersion(unsigned long idx, std::string parameter);
204
205 // ContextGroupVersion (0008,0106) vr=DT, vm=1, type=1C
206 bool getContextGroupVersion(unsigned long idx, std::string& parameter) const;
207 bool getContextGroupVersion(DCMTree::TreePtr item, std::string& parameter) const;
208 std::string getContextGroupVersionTag() const { return "(0008,0106)"; }
209 bool setContextGroupVersion(unsigned long idx, std::string parameter);
210
211 // ContextIdentifier (0008,010f) vr=CS, vm=1, type=3
212 bool getContextIdentifier(unsigned long idx, std::string& parameter) const;
213 bool getContextIdentifier(DCMTree::TreePtr item, std::string& parameter) const;
214 std::string getContextIdentifierTag() const { return "(0008,010f)"; }
215 bool setContextIdentifier(unsigned long idx, std::string parameter);
216
217 // MappingResource (0008,0105) vr=CS, vm=1, type=1C
218 bool getMappingResource(unsigned long idx, std::string& parameter) const;
219 bool getMappingResource(DCMTree::TreePtr item, std::string& parameter) const;
220 std::string getMappingResourceTag() const { return "(0008,0105)"; }
221 bool setMappingResource(unsigned long idx, std::string parameter);
222
223 // ReferencedFrameNumber (0008,1160) vr=IS, vm=1-n, type=1C
224 bool getReferencedFrameNumber(unsigned long idx, std::string& parameter) const;
225 bool getReferencedFrameNumber(DCMTree::TreePtr item, std::string& parameter) const;
226 std::string getReferencedFrameNumberTag() const { return "(0008,1160)"; }
227 bool setReferencedFrameNumber(unsigned long idx, std::string parameter);
228
229 // ReferencedSOPClassUID (0008,1150) vr=UI, vm=1, type=1
230 bool getReferencedSOPClassUID(unsigned long idx, std::string& parameter) const;
231 bool getReferencedSOPClassUID(DCMTree::TreePtr item, std::string& parameter) const;
232 std::string getReferencedSOPClassUIDTag() const { return "(0008,1150)"; }
233 bool setReferencedSOPClassUID(unsigned long idx, std::string parameter);
234
235 // ReferencedSOPInstanceUID (0008,1155) vr=UI, vm=1, type=1
236 bool getReferencedSOPInstanceUID(unsigned long idx, std::string& parameter) const;
237 bool getReferencedSOPInstanceUID(DCMTree::TreePtr item, std::string& parameter) const;
238 std::string getReferencedSOPInstanceUIDTag() const { return "(0008,1155)"; }
239 bool setReferencedSOPInstanceUID(unsigned long idx, std::string parameter);
240
241 // ReferencedSegmentNumber (0062,000b) vr=US, vm=1-n, type=1C
242 bool getReferencedSegmentNumber(unsigned long idx, MLuint16& parameter) const;
244 std::string getReferencedSegmentNumberTag() const { return "(0062,000b)"; }
245 bool setReferencedSegmentNumber(unsigned long idx, MLuint16 parameter);
246
247 // PurposeOfReferenceCodeSequence (0040,a170) vr=SQ, vm=1, type=3
249 std::string getPurposeOfReferenceCodeSequenceTag() const { return std::string("(0040,a170)"); }
251
252
255 void setSequence(std::vector<DcmDRTReferencedImageSequenceInterface::Item> dcmSequence) {
256 _itemVec = dcmSequence;
257 }
258
261 std::vector<DcmDRTReferencedImageSequenceInterface::Item> getSequence() const {
262 return _itemVec;
263 }
264
267 bool hasSequence() const {
268 return (_itemVec.size() != 0);
269 }
270
274 return static_cast<MLint>(_itemVec.size());
275 }
276
280 if (_itemVec.size() > idx) {
281 return _itemVec[idx];
282 }
284 }
285
290 return _itemVec[_itemVec.size()-1];
291 }
292
296
299 bool insertItem(const size_t idx) {
300 if (_itemVec.size() > idx) {
301 std::vector<DcmDRTReferencedImageSequenceInterface::Item>::iterator it = _itemVec.begin();
302 std::advance(it, idx);
304 return true;
305 }
306 return false;
307 }
308
311 bool removeItem(const size_t idx) {
312 if ( _itemVec.size() > idx ) {
313 std::vector<DcmDRTReferencedImageSequenceInterface::Item>::iterator it = _itemVec.begin();
314 std::advance(it, idx);
315 _itemVec.erase(it);
316 return true;
317 }
318 return false;
319 }
320
321 protected:
323 std::vector<DcmDRTReferencedImageSequenceInterface::Item> _itemVec;
324};
325
327
328#endif // __mlDcmDRTReferencedImageSequenceInterface_H
329
330/* MeVis-Hidden-Components-Start */
331/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTPurposeOfReferenceCodeSequence.
void setPurposeOfReferenceCodeSequence(DcmDRTPurposeOfReferenceCodeSequenceInterface seq)
bool getCodingSchemeDesignator(std::string &parameter) const
bool setCodingSchemeDesignator(std::string parameter)
bool setContextGroupExtensionCreatorUID(std::string parameter)
bool getMappingResource(std::string &parameter) const
bool setMappingResource(std::string parameter)
bool getContextIdentifier(std::string &parameter) const
bool getCodeValue(std::string &parameter) const
bool setContextGroupLocalVersion(std::string parameter)
bool setCodingSchemeVersion(std::string parameter)
bool setReferencedSOPClassUID(std::string parameter)
bool getContextGroupExtensionFlag(std::string &parameter) const
bool getContextGroupVersion(std::string &parameter) const
bool getReferencedSOPInstanceUID(std::string &parameter) const
bool getContextGroupLocalVersion(std::string &parameter) const
bool getContextGroupExtensionCreatorUID(std::string &parameter) const
bool setContextGroupExtensionFlag(std::string parameter)
bool getReferencedSegmentNumber(MLuint16 &parameter) const
bool getReferencedFrameNumber(std::string &parameter) const
bool setReferencedSOPInstanceUID(std::string parameter)
bool setContextGroupVersion(std::string parameter)
bool setReferencedFrameNumber(std::string parameter)
bool getCodingSchemeVersion(std::string &parameter) const
bool setReferencedSegmentNumber(MLuint16 parameter)
bool setContextIdentifier(std::string parameter)
bool getReferencedSOPClassUID(std::string &parameter) const
bool getCodeMeaning(std::string &parameter) const
DcmDRTPurposeOfReferenceCodeSequenceInterface getPurposeOfReferenceCodeSequence() const
Class to provide access to DRTReferencedImageSequence.
bool setCodeValue(unsigned long idx, std::string parameter)
virtual ~DcmDRTReferencedImageSequenceInterface()
Default virtual Destructor.
bool getReferencedSOPInstanceUID(unsigned long idx, std::string &parameter) const
bool getReferencedSOPInstanceUID(DCMTree::TreePtr item, std::string &parameter) const
bool getCodingSchemeDesignator(unsigned long idx, std::string &parameter) const
bool setReferencedSOPInstanceUID(unsigned long idx, std::string parameter)
DcmDRTReferencedImageSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getReferencedSegmentNumber(DCMTree::TreePtr item, MLuint16 &parameter) const
bool hasSequence() const
Check if the DRTReferencedImageSequence is set.
DcmDRTPurposeOfReferenceCodeSequenceInterface getPurposeOfReferenceCodeSequence(unsigned long idx) const
void setSequence(std::vector< DcmDRTReferencedImageSequenceInterface::Item > dcmSequence)
Set the DRTReferencedImageSequence this interface class provides access to.
bool setContextGroupLocalVersion(unsigned long idx, std::string parameter)
bool setReferencedFrameNumber(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
DcmDRTReferencedImageSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
DcmDRTReferencedImageSequenceInterface(std::vector< DcmDRTReferencedImageSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getContextGroupExtensionFlag(unsigned long idx, std::string &parameter) const
bool setContextGroupExtensionFlag(unsigned long idx, std::string parameter)
bool getReferencedFrameNumber(unsigned long idx, std::string &parameter) const
bool getCodeValue(DCMTree::TreePtr item, std::string &parameter) const
bool getCodeMeaning(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTReferencedImageSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getCodingSchemeVersion(unsigned long idx, std::string &parameter) const
bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setMappingResource(unsigned long idx, std::string parameter)
bool getContextGroupVersion(unsigned long idx, std::string &parameter) const
bool getContextIdentifier(unsigned long idx, std::string &parameter) const
bool setReferencedSOPClassUID(unsigned long idx, std::string parameter)
void setPurposeOfReferenceCodeSequence(DcmDRTPurposeOfReferenceCodeSequenceInterface seq, unsigned long idx)
bool getReferencedSOPClassUID(unsigned long idx, std::string &parameter) const
bool setCodeMeaning(unsigned long idx, std::string parameter)
bool setContextGroupExtensionCreatorUID(unsigned long idx, std::string parameter)
bool getReferencedSOPClassUID(DCMTree::TreePtr item, std::string &parameter) const
bool setCodingSchemeVersion(unsigned long idx, std::string parameter)
bool getMappingResource(unsigned long idx, std::string &parameter) const
bool getContextIdentifier(DCMTree::TreePtr item, std::string &parameter) const
bool getCodeMeaning(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupExtensionCreatorUID(unsigned long idx, std::string &parameter) const
bool getContextGroupExtensionFlag(DCMTree::TreePtr item, std::string &parameter) const
bool getContextGroupLocalVersion(unsigned long idx, std::string &parameter) const
bool getContextGroupLocalVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string &parameter) const
bool setReferencedSegmentNumber(unsigned long idx, MLuint16 parameter)
bool getContextGroupExtensionCreatorUID(DCMTree::TreePtr item, std::string &parameter) const
bool setContextIdentifier(unsigned long idx, std::string parameter)
bool getReferencedFrameNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getReferencedSegmentNumber(unsigned long idx, MLuint16 &parameter) const
bool setContextGroupVersion(unsigned long idx, std::string parameter)
bool setCodingSchemeDesignator(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
std::vector< DcmDRTReferencedImageSequenceInterface::Item > getSequence() const
Return the DRTReferencedImageSequence this interface class provides access to.
bool getContextGroupVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getCodeValue(unsigned long idx, std::string &parameter) const
bool getMappingResource(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTReferencedImageSequenceInterface::Item newItem)
Class to provide access to DRTPurposeOfReferenceCodeSequence.
Class collecting some DICOM helper functionality explicitly for dcmtk.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
unsigned short MLuint16
Definition mlTypeDefs.h:142
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