MeVisLab Toolbox Reference
mlDcmDRTRTROIObservationsSequenceInterface.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 __mlDcmDRTRTROIObservationsSequenceInterface_H
24#define __mlDcmDRTRTROIObservationsSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTRTROIObservationsSequenceInterface.h" //DRTRTROIObservationsSequence
31#include "mlDcmDRTROIPhysicalPropertiesSequenceInterface.h" //DRTROIPhysicalPropertiesSequence
32#include "mlDcmDRTRTROIIdentificationCodeSequenceInterface.h" //DRTRTROIIdentificationCodeSequence
33#include "mlDcmDRTRTRelatedROISequenceInterface.h" //DRTRTRelatedROISequence
34#include "mlDcmDRTRelatedRTROIObservationsSequenceInterface.h" //DRTRelatedRTROIObservationsSequence
35
36
37// ML includes
38#ifndef __mlModuleIncludes_H
39#include "mlModuleIncludes.h"
40#endif
41
43
44// ------------------------------------------------------------------
46// ------------------------------------------------------------------
48{
49 public:
50
52 {
53 public:
54
55 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
56
58
59 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
60
61 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
62
63 virtual ~Item() {}
64
65 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
66
67 bool isValid() const { return _dcmItem.get() != nullptr; }
68
69
70 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
71 bool getMaterialID(std::string& parameter) const;
72 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
73 bool setMaterialID(std::string parameter);
74
75 // ObservationNumber (3006,0082) vr=IS, vm=1, type=1
76 bool getObservationNumber(std::string& parameter) const;
77 std::string getObservationNumberTag() const { return "(3006,0082)"; }
78 bool setObservationNumber(std::string parameter);
79
80 // ROIInterpreter (3006,00a6) vr=PN, vm=1, type=2
81 bool getROIInterpreter(std::string& parameter) const;
82 std::string getROIInterpreterTag() const { return "(3006,00a6)"; }
83 bool setROIInterpreter(std::string parameter);
84
85 // ROIObservationDescription (3006,0088) vr=ST, vm=1, type=3
86 bool getROIObservationDescription(std::string& parameter) const;
87 std::string getROIObservationDescriptionTag() const { return "(3006,0088)"; }
88 bool setROIObservationDescription(std::string parameter);
89
90 // ROIObservationLabel (3006,0085) vr=SH, vm=1, type=3
91 bool getROIObservationLabel(std::string& parameter) const;
92 std::string getROIObservationLabelTag() const { return "(3006,0085)"; }
93 bool setROIObservationLabel(std::string parameter);
94
95 // RTROIInterpretedType (3006,00a4) vr=CS, vm=1, type=2
96 bool getRTROIInterpretedType(std::string& parameter) const;
97 std::string getRTROIInterpretedTypeTag() const { return "(3006,00a4)"; }
98 bool setRTROIInterpretedType(std::string parameter);
99
100 // ReferencedROINumber (3006,0084) vr=IS, vm=1, type=1
101 bool getReferencedROINumber(std::string& parameter) const;
102 std::string getReferencedROINumberTag() const { return "(3006,0084)"; }
103 bool setReferencedROINumber(std::string parameter);
104
105 // ROIPhysicalPropertiesSequence (3006,00b0) vr=SQ, vm=1, type=3
107 std::string getROIPhysicalPropertiesSequenceTag() const { return std::string("(3006,00b0)"); }
109
110 // RTROIIdentificationCodeSequence (3006,0086) vr=SQ, vm=1, type=3
112 std::string getRTROIIdentificationCodeSequenceTag() const { return std::string("(3006,0086)"); }
114
115 // RTRelatedROISequence (3006,0030) vr=SQ, vm=1, type=3
117 std::string getRTRelatedROISequenceTag() const { return std::string("(3006,0030)"); }
119
120 // RelatedRTROIObservationsSequence (3006,00a0) vr=SQ, vm=1, type=3
122 std::string getRelatedRTROIObservationsSequenceTag() const { return std::string("(3006,00a0)"); }
124
125
126 private:
127
128 DCMTree::TreePtr _dcmItem;
129
130 };
131
133
135 DcmDRTRTROIObservationsSequenceInterface(std::vector<DcmDRTRTROIObservationsSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
136
143
146 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
147 bool getMaterialID(unsigned long idx, std::string& parameter) const;
148 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
149 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
150 bool setMaterialID(unsigned long idx, std::string parameter);
151
152 // ObservationNumber (3006,0082) vr=IS, vm=1, type=1
153 bool getObservationNumber(unsigned long idx, std::string& parameter) const;
154 bool getObservationNumber(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getObservationNumberTag() const { return "(3006,0082)"; }
156 bool setObservationNumber(unsigned long idx, std::string parameter);
157
158 // ROIInterpreter (3006,00a6) vr=PN, vm=1, type=2
159 bool getROIInterpreter(unsigned long idx, std::string& parameter) const;
160 bool getROIInterpreter(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getROIInterpreterTag() const { return "(3006,00a6)"; }
162 bool setROIInterpreter(unsigned long idx, std::string parameter);
163
164 // ROIObservationDescription (3006,0088) vr=ST, vm=1, type=3
165 bool getROIObservationDescription(unsigned long idx, std::string& parameter) const;
166 bool getROIObservationDescription(DCMTree::TreePtr item, std::string& parameter) const;
167 std::string getROIObservationDescriptionTag() const { return "(3006,0088)"; }
168 bool setROIObservationDescription(unsigned long idx, std::string parameter);
169
170 // ROIObservationLabel (3006,0085) vr=SH, vm=1, type=3
171 bool getROIObservationLabel(unsigned long idx, std::string& parameter) const;
172 bool getROIObservationLabel(DCMTree::TreePtr item, std::string& parameter) const;
173 std::string getROIObservationLabelTag() const { return "(3006,0085)"; }
174 bool setROIObservationLabel(unsigned long idx, std::string parameter);
175
176 // RTROIInterpretedType (3006,00a4) vr=CS, vm=1, type=2
177 bool getRTROIInterpretedType(unsigned long idx, std::string& parameter) const;
178 bool getRTROIInterpretedType(DCMTree::TreePtr item, std::string& parameter) const;
179 std::string getRTROIInterpretedTypeTag() const { return "(3006,00a4)"; }
180 bool setRTROIInterpretedType(unsigned long idx, std::string parameter);
181
182 // ReferencedROINumber (3006,0084) vr=IS, vm=1, type=1
183 bool getReferencedROINumber(unsigned long idx, std::string& parameter) const;
184 bool getReferencedROINumber(DCMTree::TreePtr item, std::string& parameter) const;
185 std::string getReferencedROINumberTag() const { return "(3006,0084)"; }
186 bool setReferencedROINumber(unsigned long idx, std::string parameter);
187
188 // ROIPhysicalPropertiesSequence (3006,00b0) vr=SQ, vm=1, type=3
190 std::string getROIPhysicalPropertiesSequenceTag() const { return std::string("(3006,00b0)"); }
192
193 // RTROIIdentificationCodeSequence (3006,0086) vr=SQ, vm=1, type=3
195 std::string getRTROIIdentificationCodeSequenceTag() const { return std::string("(3006,0086)"); }
197
198 // RTRelatedROISequence (3006,0030) vr=SQ, vm=1, type=3
200 std::string getRTRelatedROISequenceTag() const { return std::string("(3006,0030)"); }
202
203 // RelatedRTROIObservationsSequence (3006,00a0) vr=SQ, vm=1, type=3
205 std::string getRelatedRTROIObservationsSequenceTag() const { return std::string("(3006,00a0)"); }
207
208
211 void setSequence(std::vector<DcmDRTRTROIObservationsSequenceInterface::Item> dcmSequence) {
212 _itemVec = dcmSequence;
213 }
214
217 std::vector<DcmDRTRTROIObservationsSequenceInterface::Item> getSequence() const {
218 return _itemVec;
219 }
220
223 bool hasSequence() const {
224 return (_itemVec.size() != 0);
225 }
226
230 return static_cast<MLint>(_itemVec.size());
231 }
232
236 if (_itemVec.size() > idx) {
237 return _itemVec[idx];
238 }
240 }
241
246 return _itemVec[_itemVec.size()-1];
247 }
248
252
255 bool insertItem(const size_t idx) {
256 if (_itemVec.size() > idx) {
257 std::vector<DcmDRTRTROIObservationsSequenceInterface::Item>::iterator it = _itemVec.begin();
258 std::advance(it, idx);
260 return true;
261 }
262 return false;
263 }
264
267 bool removeItem(const size_t idx) {
268 if ( _itemVec.size() > idx ) {
269 std::vector<DcmDRTRTROIObservationsSequenceInterface::Item>::iterator it = _itemVec.begin();
270 std::advance(it, idx);
271 _itemVec.erase(it);
272 return true;
273 }
274 return false;
275 }
276
277 protected:
279 std::vector<DcmDRTRTROIObservationsSequenceInterface::Item> _itemVec;
280};
281
283
284#endif // __mlDcmDRTRTROIObservationsSequenceInterface_H
285
286/* MeVis-Hidden-Components-Start */
287/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTROIPhysicalPropertiesSequence.
Class to provide access to DRTRTROIIdentificationCodeSequence.
bool setReferencedROINumber(std::string parameter)
bool setROIObservationLabel(std::string parameter)
bool setROIObservationDescription(std::string parameter)
bool getMaterialID(std::string &parameter) const
bool getROIInterpreter(std::string &parameter) const
void setROIPhysicalPropertiesSequence(DcmDRTROIPhysicalPropertiesSequenceInterface seq)
bool getROIObservationDescription(std::string &parameter) const
void setRelatedRTROIObservationsSequence(DcmDRTRelatedRTROIObservationsSequenceInterface seq)
DcmDRTRTROIIdentificationCodeSequenceInterface getRTROIIdentificationCodeSequence() const
DcmDRTROIPhysicalPropertiesSequenceInterface getROIPhysicalPropertiesSequence() const
bool getObservationNumber(std::string &parameter) const
DcmDRTRelatedRTROIObservationsSequenceInterface getRelatedRTROIObservationsSequence() const
bool getReferencedROINumber(std::string &parameter) const
bool getROIObservationLabel(std::string &parameter) const
bool setObservationNumber(std::string parameter)
void setRTROIIdentificationCodeSequence(DcmDRTRTROIIdentificationCodeSequenceInterface seq)
DcmDRTRTRelatedROISequenceInterface getRTRelatedROISequence() const
void setRTRelatedROISequence(DcmDRTRTRelatedROISequenceInterface seq)
bool getRTROIInterpretedType(std::string &parameter) const
bool setRTROIInterpretedType(std::string parameter)
Class to provide access to DRTRTROIObservationsSequence.
bool getROIObservationLabel(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
void setROIPhysicalPropertiesSequence(DcmDRTROIPhysicalPropertiesSequenceInterface seq, unsigned long idx)
std::vector< DcmDRTRTROIObservationsSequenceInterface::Item > getSequence() const
Return the DRTRTROIObservationsSequence this interface class provides access to.
void setRTROIIdentificationCodeSequence(DcmDRTRTROIIdentificationCodeSequenceInterface seq, unsigned long idx)
DcmDRTRTROIIdentificationCodeSequenceInterface getRTROIIdentificationCodeSequence(unsigned long idx) const
bool getROIInterpreter(DCMTree::TreePtr item, std::string &parameter) const
bool getMaterialID(unsigned long idx, std::string &parameter) const
bool getReferencedROINumber(unsigned long idx, std::string &parameter) const
bool getReferencedROINumber(DCMTree::TreePtr item, std::string &parameter) const
bool setROIInterpreter(unsigned long idx, std::string parameter)
DcmDRTRelatedRTROIObservationsSequenceInterface getRelatedRTROIObservationsSequence(unsigned long idx) const
bool getROIObservationDescription(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
DcmDRTRTROIObservationsSequenceInterface(std::vector< DcmDRTRTROIObservationsSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getObservationNumber(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTRTROIObservationsSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getRTROIInterpretedType(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTRTROIObservationsSequenceInterface::Item newItem)
bool getROIObservationLabel(unsigned long idx, std::string &parameter) const
bool getObservationNumber(unsigned long idx, std::string &parameter) const
DcmDRTRTROIObservationsSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getROIObservationDescription(DCMTree::TreePtr item, std::string &parameter) const
bool setROIObservationDescription(unsigned long idx, std::string parameter)
DcmDRTRTROIObservationsSequenceInterface::Item & addItem()
Adds a new item to the sequence.
DcmDRTROIPhysicalPropertiesSequenceInterface getROIPhysicalPropertiesSequence(unsigned long idx) const
bool hasSequence() const
Check if the DRTRTROIObservationsSequence is set.
bool setMaterialID(unsigned long idx, std::string parameter)
void setRTRelatedROISequence(DcmDRTRTRelatedROISequenceInterface seq, unsigned long idx)
bool setReferencedROINumber(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTRTROIObservationsSequenceInterface::Item > dcmSequence)
Set the DRTRTROIObservationsSequence this interface class provides access to.
bool setRTROIInterpretedType(unsigned long idx, std::string parameter)
bool setROIObservationLabel(unsigned long idx, std::string parameter)
void setRelatedRTROIObservationsSequence(DcmDRTRelatedRTROIObservationsSequenceInterface seq, unsigned long idx)
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTRTRelatedROISequenceInterface getRTRelatedROISequence(unsigned long idx) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getRTROIInterpretedType(DCMTree::TreePtr item, std::string &parameter) const
bool getROIInterpreter(unsigned long idx, std::string &parameter) const
bool setObservationNumber(unsigned long idx, std::string parameter)
Class to provide access to DRTRTRelatedROISequence.
Class to provide access to DRTRelatedRTROIObservationsSequence.
Class to provide access to DRTROIPhysicalPropertiesSequence.
Class to provide access to DRTRTROIIdentificationCodeSequence.
Class to provide access to DRTRTRelatedROISequence.
Class to provide access to DRTRelatedRTROIObservationsSequence.
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