MeVisLab Toolbox Reference
mlDcmDRTReferencedFrameOfReferenceSequenceInterface.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 __mlDcmDRTReferencedFrameOfReferenceSequenceInterface_H
24#define __mlDcmDRTReferencedFrameOfReferenceSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTReferencedFrameOfReferenceSequenceInterface.h" //DRTReferencedFrameOfReferenceSequence
31#include "mlDcmDRTFrameOfReferenceRelationshipSequenceInterface.h" //DRTFrameOfReferenceRelationshipSequence
32#include "mlDcmDRTRTReferencedStudySequenceInterface.h" //DRTRTReferencedStudySequence
33
34
35// ML includes
36#ifndef __mlModuleIncludes_H
37#include "mlModuleIncludes.h"
38#endif
39
41
42// ------------------------------------------------------------------
44// ------------------------------------------------------------------
46{
47 public:
48
50 {
51 public:
52
53 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
54
56
57 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
58
59 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
60
61 virtual ~Item() {}
62
63 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
64
65 bool isValid() const { return _dcmItem.get() != nullptr; }
66
67
68 // FrameOfReferenceUID (0020,0052) vr=UI, vm=1, type=1C
69 bool getFrameOfReferenceUID(std::string& parameter) const;
70 std::string getFrameOfReferenceUIDTag() const { return "(0020,0052)"; }
71 bool setFrameOfReferenceUID(std::string parameter);
72
73 // ROIDescription (3006,0028) vr=ST, vm=1, type=3
74 bool getROIDescription(std::string& parameter) const;
75 std::string getROIDescriptionTag() const { return "(3006,0028)"; }
76 bool setROIDescription(std::string parameter);
77
78 // ROIGenerationAlgorithm (3006,0036) vr=CS, vm=1, type=2C
79 bool getROIGenerationAlgorithm(std::string& parameter) const;
80 std::string getROIGenerationAlgorithmTag() const { return "(3006,0036)"; }
81 bool setROIGenerationAlgorithm(std::string parameter);
82
83 // ROIGenerationDescription (3006,0038) vr=LO, vm=1, type=3
84 bool getROIGenerationDescription(std::string& parameter) const;
85 std::string getROIGenerationDescriptionTag() const { return "(3006,0038)"; }
86 bool setROIGenerationDescription(std::string parameter);
87
88 // ROIName (3006,0026) vr=LO, vm=1, type=2C
89 bool getROIName(std::string& parameter) const;
90 std::string getROINameTag() const { return "(3006,0026)"; }
91 bool setROIName(std::string parameter);
92
93 // ROINumber (3006,0022) vr=IS, vm=1, type=1C
94 bool getROINumber(std::string& parameter) const;
95 std::string getROINumberTag() const { return "(3006,0022)"; }
96 bool setROINumber(std::string parameter);
97
98 // ROIVolume (3006,002c) vr=DS, vm=1, type=3
99 bool getROIVolume(std::string& parameter) const;
100 std::string getROIVolumeTag() const { return "(3006,002c)"; }
101 bool setROIVolume(std::string parameter);
102
103 // ReferencedFrameOfReferenceUID (3006,0024) vr=UI, vm=1, type=1C
104 bool getReferencedFrameOfReferenceUID(std::string& parameter) const;
105 std::string getReferencedFrameOfReferenceUIDTag() const { return "(3006,0024)"; }
106 bool setReferencedFrameOfReferenceUID(std::string parameter);
107
108 // FrameOfReferenceRelationshipSequence (3006,00c0) vr=SQ, vm=1, type=3
110 std::string getFrameOfReferenceRelationshipSequenceTag() const { return std::string("(3006,00c0)"); }
112
113 // RTReferencedStudySequence (3006,0012) vr=SQ, vm=1, type=3
115 std::string getRTReferencedStudySequenceTag() const { return std::string("(3006,0012)"); }
117
118
119 private:
120
121 DCMTree::TreePtr _dcmItem;
122
123 };
124
126
128 DcmDRTReferencedFrameOfReferenceSequenceInterface(std::vector<DcmDRTReferencedFrameOfReferenceSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
129
136
139 // FrameOfReferenceUID (0020,0052) vr=UI, vm=1, type=1C
140 bool getFrameOfReferenceUID(unsigned long idx, std::string& parameter) const;
141 bool getFrameOfReferenceUID(DCMTree::TreePtr item, std::string& parameter) const;
142 std::string getFrameOfReferenceUIDTag() const { return "(0020,0052)"; }
143 bool setFrameOfReferenceUID(unsigned long idx, std::string parameter);
144
145 // ROIDescription (3006,0028) vr=ST, vm=1, type=3
146 bool getROIDescription(unsigned long idx, std::string& parameter) const;
147 bool getROIDescription(DCMTree::TreePtr item, std::string& parameter) const;
148 std::string getROIDescriptionTag() const { return "(3006,0028)"; }
149 bool setROIDescription(unsigned long idx, std::string parameter);
150
151 // ROIGenerationAlgorithm (3006,0036) vr=CS, vm=1, type=2C
152 bool getROIGenerationAlgorithm(unsigned long idx, std::string& parameter) const;
153 bool getROIGenerationAlgorithm(DCMTree::TreePtr item, std::string& parameter) const;
154 std::string getROIGenerationAlgorithmTag() const { return "(3006,0036)"; }
155 bool setROIGenerationAlgorithm(unsigned long idx, std::string parameter);
156
157 // ROIGenerationDescription (3006,0038) vr=LO, vm=1, type=3
158 bool getROIGenerationDescription(unsigned long idx, std::string& parameter) const;
159 bool getROIGenerationDescription(DCMTree::TreePtr item, std::string& parameter) const;
160 std::string getROIGenerationDescriptionTag() const { return "(3006,0038)"; }
161 bool setROIGenerationDescription(unsigned long idx, std::string parameter);
162
163 // ROIName (3006,0026) vr=LO, vm=1, type=2C
164 bool getROIName(unsigned long idx, std::string& parameter) const;
165 bool getROIName(DCMTree::TreePtr item, std::string& parameter) const;
166 std::string getROINameTag() const { return "(3006,0026)"; }
167 bool setROIName(unsigned long idx, std::string parameter);
168
169 // ROINumber (3006,0022) vr=IS, vm=1, type=1C
170 bool getROINumber(unsigned long idx, std::string& parameter) const;
171 bool getROINumber(DCMTree::TreePtr item, std::string& parameter) const;
172 std::string getROINumberTag() const { return "(3006,0022)"; }
173 bool setROINumber(unsigned long idx, std::string parameter);
174
175 // ROIVolume (3006,002c) vr=DS, vm=1, type=3
176 bool getROIVolume(unsigned long idx, std::string& parameter) const;
177 bool getROIVolume(DCMTree::TreePtr item, std::string& parameter) const;
178 std::string getROIVolumeTag() const { return "(3006,002c)"; }
179 bool setROIVolume(unsigned long idx, std::string parameter);
180
181 // ReferencedFrameOfReferenceUID (3006,0024) vr=UI, vm=1, type=1C
182 bool getReferencedFrameOfReferenceUID(unsigned long idx, std::string& parameter) const;
183 bool getReferencedFrameOfReferenceUID(DCMTree::TreePtr item, std::string& parameter) const;
184 std::string getReferencedFrameOfReferenceUIDTag() const { return "(3006,0024)"; }
185 bool setReferencedFrameOfReferenceUID(unsigned long idx, std::string parameter);
186
187 // FrameOfReferenceRelationshipSequence (3006,00c0) vr=SQ, vm=1, type=3
189 std::string getFrameOfReferenceRelationshipSequenceTag() const { return std::string("(3006,00c0)"); }
191
192 // RTReferencedStudySequence (3006,0012) vr=SQ, vm=1, type=3
194 std::string getRTReferencedStudySequenceTag() const { return std::string("(3006,0012)"); }
196
197
200 void setSequence(std::vector<DcmDRTReferencedFrameOfReferenceSequenceInterface::Item> dcmSequence) {
201 _itemVec = dcmSequence;
202 }
203
206 std::vector<DcmDRTReferencedFrameOfReferenceSequenceInterface::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<DcmDRTReferencedFrameOfReferenceSequenceInterface::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<DcmDRTReferencedFrameOfReferenceSequenceInterface::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<DcmDRTReferencedFrameOfReferenceSequenceInterface::Item> _itemVec;
269};
270
272
273#endif // __mlDcmDRTReferencedFrameOfReferenceSequenceInterface_H
274
275/* MeVis-Hidden-Components-Start */
276/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTFrameOfReferenceRelationshipSequence.
Class to provide access to DRTRTReferencedStudySequence.
bool getReferencedFrameOfReferenceUID(std::string &parameter) const
bool getROIDescription(std::string &parameter) const
bool getROIGenerationAlgorithm(std::string &parameter) const
void setFrameOfReferenceRelationshipSequence(DcmDRTFrameOfReferenceRelationshipSequenceInterface seq)
bool getROIGenerationDescription(std::string &parameter) const
DcmDRTRTReferencedStudySequenceInterface getRTReferencedStudySequence() const
bool getFrameOfReferenceUID(std::string &parameter) const
void setRTReferencedStudySequence(DcmDRTRTReferencedStudySequenceInterface seq)
DcmDRTFrameOfReferenceRelationshipSequenceInterface getFrameOfReferenceRelationshipSequence() const
Class to provide access to DRTReferencedFrameOfReferenceSequence.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getROIName(unsigned long idx, std::string &parameter) const
void setRTReferencedStudySequence(DcmDRTRTReferencedStudySequenceInterface seq, unsigned long idx)
bool getROINumber(unsigned long idx, std::string &parameter) const
bool getROIVolume(unsigned long idx, std::string &parameter) const
bool getROIGenerationAlgorithm(unsigned long idx, std::string &parameter) const
DcmDRTReferencedFrameOfReferenceSequenceInterface::Item & addItem()
Adds a new item to the sequence.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getROIDescription(unsigned long idx, std::string &parameter) const
bool getROIDescription(DCMTree::TreePtr item, std::string &parameter) const
bool hasSequence() const
Check if the DRTReferencedFrameOfReferenceSequence is set.
void setFrameOfReferenceRelationshipSequence(DcmDRTFrameOfReferenceRelationshipSequenceInterface seq, unsigned long idx)
bool getROIGenerationAlgorithm(DCMTree::TreePtr item, std::string &parameter) const
bool getReferencedFrameOfReferenceUID(unsigned long idx, std::string &parameter) const
DcmDRTFrameOfReferenceRelationshipSequenceInterface getFrameOfReferenceRelationshipSequence(unsigned long idx) const
bool setROIGenerationDescription(unsigned long idx, std::string parameter)
bool setFrameOfReferenceUID(unsigned long idx, std::string parameter)
bool getFrameOfReferenceUID(DCMTree::TreePtr item, std::string &parameter) const
bool getReferencedFrameOfReferenceUID(DCMTree::TreePtr item, std::string &parameter) const
bool getROIGenerationDescription(DCMTree::TreePtr item, std::string &parameter) const
bool setReferencedFrameOfReferenceUID(unsigned long idx, std::string parameter)
std::vector< DcmDRTReferencedFrameOfReferenceSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
DcmDRTRTReferencedStudySequenceInterface getRTReferencedStudySequence(unsigned long idx) const
bool getFrameOfReferenceUID(unsigned long idx, std::string &parameter) const
bool getROIGenerationDescription(unsigned long idx, std::string &parameter) const
DcmDRTReferencedFrameOfReferenceSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setROINumber(unsigned long idx, std::string parameter)
DcmDRTReferencedFrameOfReferenceSequenceInterface(std::vector< DcmDRTReferencedFrameOfReferenceSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getROIVolume(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
std::vector< DcmDRTReferencedFrameOfReferenceSequenceInterface::Item > getSequence() const
Return the DRTReferencedFrameOfReferenceSequence this interface class provides access to.
bool setROIDescription(unsigned long idx, std::string parameter)
bool setROIVolume(unsigned long idx, std::string parameter)
bool setROIName(unsigned long idx, std::string parameter)
bool setROIGenerationAlgorithm(unsigned long idx, std::string parameter)
bool getROINumber(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTReferencedFrameOfReferenceSequenceInterface::Item newItem)
void setSequence(std::vector< DcmDRTReferencedFrameOfReferenceSequenceInterface::Item > dcmSequence)
Set the DRTReferencedFrameOfReferenceSequence this interface class provides access to.
bool getROIName(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTFrameOfReferenceRelationshipSequence.
Class to provide access to DRTRTReferencedStudySequence.
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