MeVisLab Toolbox Reference
mlDcmDRTCompensatorSequenceInterface.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 __mlDcmDRTCompensatorSequenceInterface_H
24#define __mlDcmDRTCompensatorSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTCompensatorSequenceInterface.h" //DRTCompensatorSequence
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 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
67 bool getAccessoryCode(std::string& parameter) const;
68 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
69 bool setAccessoryCode(std::string parameter);
70
71 // CompensatorColumns (300a,00e8) vr=IS, vm=1, type=1C
72 bool getCompensatorColumns(std::string& parameter) const;
73 std::string getCompensatorColumnsTag() const { return "(300a,00e8)"; }
74 bool setCompensatorColumns(std::string parameter);
75
76 // CompensatorDivergence (300a,02e0) vr=CS, vm=1, type=3
77 bool getCompensatorDivergence(std::string& parameter) const;
78 std::string getCompensatorDivergenceTag() const { return "(300a,02e0)"; }
79 bool setCompensatorDivergence(std::string parameter);
80
81 // CompensatorID (300a,00e5) vr=SH, vm=1, type=3
82 bool getCompensatorID(std::string& parameter) const;
83 std::string getCompensatorIDTag() const { return "(300a,00e5)"; }
84 bool setCompensatorID(std::string parameter);
85
86 // CompensatorMountingPosition (300a,02e1) vr=CS, vm=1, type=3
87 bool getCompensatorMountingPosition(std::string& parameter) const;
88 std::string getCompensatorMountingPositionTag() const { return "(300a,02e1)"; }
89 bool setCompensatorMountingPosition(std::string parameter);
90
91 // CompensatorNumber (300a,00e4) vr=IS, vm=1, type=1C
92 bool getCompensatorNumber(std::string& parameter) const;
93 std::string getCompensatorNumberTag() const { return "(300a,00e4)"; }
94 bool setCompensatorNumber(std::string parameter);
95
96 // CompensatorPixelSpacing (300a,00e9) vr=DS, vm=2, type=1C
97 bool getCompensatorPixelSpacing(std::string& parameter) const;
98 std::string getCompensatorPixelSpacingTag() const { return "(300a,00e9)"; }
99 bool setCompensatorPixelSpacing(std::string parameter);
100
101 // CompensatorPosition (300a,00ea) vr=DS, vm=2, type=1C
102 bool getCompensatorPosition(std::string& parameter) const;
103 std::string getCompensatorPositionTag() const { return "(300a,00ea)"; }
104 bool setCompensatorPosition(std::string parameter);
105
106 // CompensatorRows (300a,00e7) vr=IS, vm=1, type=1C
107 bool getCompensatorRows(std::string& parameter) const;
108 std::string getCompensatorRowsTag() const { return "(300a,00e7)"; }
109 bool setCompensatorRows(std::string parameter);
110
111 // CompensatorThicknessData (300a,00ec) vr=DS, vm=1-n, type=1C
112 bool getCompensatorThicknessData(std::string& parameter) const;
113 std::string getCompensatorThicknessDataTag() const { return "(300a,00ec)"; }
114 bool setCompensatorThicknessData(std::string parameter);
115
116 // CompensatorTransmissionData (300a,00eb) vr=DS, vm=1-n, type=1C
117 bool getCompensatorTransmissionData(std::string& parameter) const;
118 std::string getCompensatorTransmissionDataTag() const { return "(300a,00eb)"; }
119 bool setCompensatorTransmissionData(std::string parameter);
120
121 // CompensatorType (300a,00ee) vr=CS, vm=1, type=3
122 bool getCompensatorType(std::string& parameter) const;
123 std::string getCompensatorTypeTag() const { return "(300a,00ee)"; }
124 bool setCompensatorType(std::string parameter);
125
126 // MaterialID (300a,00e1) vr=SH, vm=1, type=2C
127 bool getMaterialID(std::string& parameter) const;
128 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
129 bool setMaterialID(std::string parameter);
130
131 // SourceToCompensatorDistance (300a,02e2) vr=DS, vm=1-n, type=1C
132 bool getSourceToCompensatorDistance(std::string& parameter) const;
133 std::string getSourceToCompensatorDistanceTag() const { return "(300a,02e2)"; }
134 bool setSourceToCompensatorDistance(std::string parameter);
135
136 // SourceToCompensatorTrayDistance (300a,00e6) vr=DS, vm=1, type=2C
137 bool getSourceToCompensatorTrayDistance(std::string& parameter) const;
138 std::string getSourceToCompensatorTrayDistanceTag() const { return "(300a,00e6)"; }
139 bool setSourceToCompensatorTrayDistance(std::string parameter);
140
141
142 private:
143
144 DCMTree::TreePtr _dcmItem;
145
146 };
147
149
151 DcmDRTCompensatorSequenceInterface(std::vector<DcmDRTCompensatorSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
152
154 for(size_t i=0; i < treePtrSeq.size(); i++)
155 {
157 }
158 }
159
162 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
163 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
164 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
165 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
166 bool setAccessoryCode(unsigned long idx, std::string parameter);
167
168 // CompensatorColumns (300a,00e8) vr=IS, vm=1, type=1C
169 bool getCompensatorColumns(unsigned long idx, std::string& parameter) const;
170 bool getCompensatorColumns(DCMTree::TreePtr item, std::string& parameter) const;
171 std::string getCompensatorColumnsTag() const { return "(300a,00e8)"; }
172 bool setCompensatorColumns(unsigned long idx, std::string parameter);
173
174 // CompensatorDivergence (300a,02e0) vr=CS, vm=1, type=3
175 bool getCompensatorDivergence(unsigned long idx, std::string& parameter) const;
176 bool getCompensatorDivergence(DCMTree::TreePtr item, std::string& parameter) const;
177 std::string getCompensatorDivergenceTag() const { return "(300a,02e0)"; }
178 bool setCompensatorDivergence(unsigned long idx, std::string parameter);
179
180 // CompensatorID (300a,00e5) vr=SH, vm=1, type=3
181 bool getCompensatorID(unsigned long idx, std::string& parameter) const;
182 bool getCompensatorID(DCMTree::TreePtr item, std::string& parameter) const;
183 std::string getCompensatorIDTag() const { return "(300a,00e5)"; }
184 bool setCompensatorID(unsigned long idx, std::string parameter);
185
186 // CompensatorMountingPosition (300a,02e1) vr=CS, vm=1, type=3
187 bool getCompensatorMountingPosition(unsigned long idx, std::string& parameter) const;
188 bool getCompensatorMountingPosition(DCMTree::TreePtr item, std::string& parameter) const;
189 std::string getCompensatorMountingPositionTag() const { return "(300a,02e1)"; }
190 bool setCompensatorMountingPosition(unsigned long idx, std::string parameter);
191
192 // CompensatorNumber (300a,00e4) vr=IS, vm=1, type=1C
193 bool getCompensatorNumber(unsigned long idx, std::string& parameter) const;
194 bool getCompensatorNumber(DCMTree::TreePtr item, std::string& parameter) const;
195 std::string getCompensatorNumberTag() const { return "(300a,00e4)"; }
196 bool setCompensatorNumber(unsigned long idx, std::string parameter);
197
198 // CompensatorPixelSpacing (300a,00e9) vr=DS, vm=2, type=1C
199 bool getCompensatorPixelSpacing(unsigned long idx, std::string& parameter) const;
200 bool getCompensatorPixelSpacing(DCMTree::TreePtr item, std::string& parameter) const;
201 std::string getCompensatorPixelSpacingTag() const { return "(300a,00e9)"; }
202 bool setCompensatorPixelSpacing(unsigned long idx, std::string parameter);
203
204 // CompensatorPosition (300a,00ea) vr=DS, vm=2, type=1C
205 bool getCompensatorPosition(unsigned long idx, std::string& parameter) const;
206 bool getCompensatorPosition(DCMTree::TreePtr item, std::string& parameter) const;
207 std::string getCompensatorPositionTag() const { return "(300a,00ea)"; }
208 bool setCompensatorPosition(unsigned long idx, std::string parameter);
209
210 // CompensatorRows (300a,00e7) vr=IS, vm=1, type=1C
211 bool getCompensatorRows(unsigned long idx, std::string& parameter) const;
212 bool getCompensatorRows(DCMTree::TreePtr item, std::string& parameter) const;
213 std::string getCompensatorRowsTag() const { return "(300a,00e7)"; }
214 bool setCompensatorRows(unsigned long idx, std::string parameter);
215
216 // CompensatorThicknessData (300a,00ec) vr=DS, vm=1-n, type=1C
217 bool getCompensatorThicknessData(unsigned long idx, std::string& parameter) const;
218 bool getCompensatorThicknessData(DCMTree::TreePtr item, std::string& parameter) const;
219 std::string getCompensatorThicknessDataTag() const { return "(300a,00ec)"; }
220 bool setCompensatorThicknessData(unsigned long idx, std::string parameter);
221
222 // CompensatorTransmissionData (300a,00eb) vr=DS, vm=1-n, type=1C
223 bool getCompensatorTransmissionData(unsigned long idx, std::string& parameter) const;
224 bool getCompensatorTransmissionData(DCMTree::TreePtr item, std::string& parameter) const;
225 std::string getCompensatorTransmissionDataTag() const { return "(300a,00eb)"; }
226 bool setCompensatorTransmissionData(unsigned long idx, std::string parameter);
227
228 // CompensatorType (300a,00ee) vr=CS, vm=1, type=3
229 bool getCompensatorType(unsigned long idx, std::string& parameter) const;
230 bool getCompensatorType(DCMTree::TreePtr item, std::string& parameter) const;
231 std::string getCompensatorTypeTag() const { return "(300a,00ee)"; }
232 bool setCompensatorType(unsigned long idx, std::string parameter);
233
234 // MaterialID (300a,00e1) vr=SH, vm=1, type=2C
235 bool getMaterialID(unsigned long idx, std::string& parameter) const;
236 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
237 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
238 bool setMaterialID(unsigned long idx, std::string parameter);
239
240 // SourceToCompensatorDistance (300a,02e2) vr=DS, vm=1-n, type=1C
241 bool getSourceToCompensatorDistance(unsigned long idx, std::string& parameter) const;
242 bool getSourceToCompensatorDistance(DCMTree::TreePtr item, std::string& parameter) const;
243 std::string getSourceToCompensatorDistanceTag() const { return "(300a,02e2)"; }
244 bool setSourceToCompensatorDistance(unsigned long idx, std::string parameter);
245
246 // SourceToCompensatorTrayDistance (300a,00e6) vr=DS, vm=1, type=2C
247 bool getSourceToCompensatorTrayDistance(unsigned long idx, std::string& parameter) const;
248 bool getSourceToCompensatorTrayDistance(DCMTree::TreePtr item, std::string& parameter) const;
249 std::string getSourceToCompensatorTrayDistanceTag() const { return "(300a,00e6)"; }
250 bool setSourceToCompensatorTrayDistance(unsigned long idx, std::string parameter);
251
252
255 void setSequence(std::vector<DcmDRTCompensatorSequenceInterface::Item> dcmSequence) {
256 _itemVec = dcmSequence;
257 }
258
261 std::vector<DcmDRTCompensatorSequenceInterface::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
289 _itemVec.push_back(DcmDRTCompensatorSequenceInterface::Item());
290 return _itemVec[_itemVec.size()-1];
291 }
292
294 _itemVec.push_back(newItem);
295 }
296
299 bool insertItem(const size_t idx) {
300 if (_itemVec.size() > idx) {
301 std::vector<DcmDRTCompensatorSequenceInterface::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<DcmDRTCompensatorSequenceInterface::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<DcmDRTCompensatorSequenceInterface::Item> _itemVec;
324};
325
327
328#endif // __mlDcmDRTCompensatorSequenceInterface_H
329
330/* MeVis-Hidden-Components-Start */
331/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setCompensatorType(std::string parameter)
bool setAccessoryCode(std::string parameter)
bool getCompensatorPosition(std::string &parameter) const
bool getCompensatorPixelSpacing(std::string &parameter) const
bool setCompensatorPixelSpacing(std::string parameter)
bool setCompensatorID(std::string parameter)
bool setCompensatorRows(std::string parameter)
bool getAccessoryCode(std::string &parameter) const
bool getCompensatorID(std::string &parameter) const
bool setCompensatorTransmissionData(std::string parameter)
bool setCompensatorNumber(std::string parameter)
bool setCompensatorPosition(std::string parameter)
bool getCompensatorDivergence(std::string &parameter) const
bool setCompensatorDivergence(std::string parameter)
bool getCompensatorTransmissionData(std::string &parameter) const
bool setCompensatorColumns(std::string parameter)
bool getCompensatorType(std::string &parameter) const
bool getCompensatorColumns(std::string &parameter) const
bool getSourceToCompensatorTrayDistance(std::string &parameter) const
bool getMaterialID(std::string &parameter) const
bool setSourceToCompensatorDistance(std::string parameter)
bool setCompensatorMountingPosition(std::string parameter)
bool setSourceToCompensatorTrayDistance(std::string parameter)
bool getCompensatorNumber(std::string &parameter) const
bool getCompensatorThicknessData(std::string &parameter) const
bool getCompensatorRows(std::string &parameter) const
bool setCompensatorThicknessData(std::string parameter)
bool getSourceToCompensatorDistance(std::string &parameter) const
bool setMaterialID(std::string parameter)
bool getCompensatorMountingPosition(std::string &parameter) const
Class to provide access to DRTCompensatorSequence.
bool setCompensatorNumber(unsigned long idx, std::string parameter)
bool getCompensatorType(unsigned long idx, std::string &parameter) const
bool getCompensatorPixelSpacing(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTCompensatorSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorPosition(DCMTree::TreePtr item, std::string &parameter) const
virtual ~DcmDRTCompensatorSequenceInterface()
Default virtual Destructor.
bool getCompensatorRows(unsigned long idx, std::string &parameter) const
bool getCompensatorDivergence(unsigned long idx, std::string &parameter) const
bool setCompensatorMountingPosition(unsigned long idx, std::string parameter)
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
bool hasSequence() const
Check if the DRTCompensatorSequence is set.
bool getCompensatorThicknessData(unsigned long idx, std::string &parameter) const
bool getCompensatorMountingPosition(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTCompensatorSequenceInterface::Item > dcmSequence)
Set the DRTCompensatorSequence this interface class provides access to.
bool setCompensatorID(unsigned long idx, std::string parameter)
bool getCompensatorPosition(unsigned long idx, std::string &parameter) const
bool setCompensatorPixelSpacing(unsigned long idx, std::string parameter)
bool setCompensatorRows(unsigned long idx, std::string parameter)
DcmDRTCompensatorSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getSourceToCompensatorDistance(DCMTree::TreePtr item, std::string &parameter) const
bool setSourceToCompensatorDistance(unsigned long idx, std::string parameter)
bool getCompensatorRows(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceToCompensatorTrayDistance(DCMTree::TreePtr item, std::string &parameter) const
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
bool getMaterialID(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTCompensatorSequenceInterface::Item > getSequence() const
Return the DRTCompensatorSequence this interface class provides access to.
bool setMaterialID(unsigned long idx, std::string parameter)
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool setSourceToCompensatorTrayDistance(unsigned long idx, std::string parameter)
bool getCompensatorNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorPixelSpacing(unsigned long idx, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getCompensatorID(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTCompensatorSequenceInterface::Item newItem)
bool getCompensatorType(DCMTree::TreePtr item, std::string &parameter) const
bool setCompensatorTransmissionData(unsigned long idx, std::string parameter)
std::vector< DcmDRTCompensatorSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
DcmDRTCompensatorSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getCompensatorTransmissionData(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceToCompensatorTrayDistance(unsigned long idx, std::string &parameter) const
bool setCompensatorPosition(unsigned long idx, std::string parameter)
bool getCompensatorID(unsigned long idx, std::string &parameter) const
bool setCompensatorType(unsigned long idx, std::string parameter)
bool getCompensatorTransmissionData(unsigned long idx, std::string &parameter) const
bool getCompensatorMountingPosition(DCMTree::TreePtr item, std::string &parameter) const
bool setCompensatorColumns(unsigned long idx, std::string parameter)
bool getSourceToCompensatorDistance(unsigned long idx, std::string &parameter) const
bool getCompensatorColumns(unsigned long idx, std::string &parameter) const
bool getCompensatorThicknessData(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorDivergence(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorColumns(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTCompensatorSequenceInterface(std::vector< DcmDRTCompensatorSequenceInterface::Item > dcmSequence)
Default Constructor.
bool setCompensatorDivergence(unsigned long idx, std::string parameter)
bool setCompensatorThicknessData(unsigned long idx, std::string parameter)
bool getCompensatorNumber(unsigned long idx, std::string &parameter) const
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