MeVisLab Toolbox Reference
mlDcmDRTIonRangeCompensatorSequenceInterface.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 __mlDcmDRTIonRangeCompensatorSequenceInterface_H
24#define __mlDcmDRTIonRangeCompensatorSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTIonRangeCompensatorSequenceInterface.h" //DRTIonRangeCompensatorSequence
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 // CompensatorColumnOffset (300a,02e5) vr=FL, vm=1, type=1C
72 bool getCompensatorColumnOffset(float& parameter) const;
73 std::string getCompensatorColumnOffsetTag() const { return "(300a,02e5)"; }
74 bool setCompensatorColumnOffset(float parameter);
75
76 // CompensatorColumns (300a,00e8) vr=IS, vm=1, type=1
77 bool getCompensatorColumns(std::string& parameter) const;
78 std::string getCompensatorColumnsTag() const { return "(300a,00e8)"; }
79 bool setCompensatorColumns(std::string parameter);
80
81 // CompensatorDivergence (300a,02e0) vr=CS, vm=1, type=1
82 bool getCompensatorDivergence(std::string& parameter) const;
83 std::string getCompensatorDivergenceTag() const { return "(300a,02e0)"; }
84 bool setCompensatorDivergence(std::string parameter);
85
86 // CompensatorID (300a,00e5) vr=SH, vm=1, type=3
87 bool getCompensatorID(std::string& parameter) const;
88 std::string getCompensatorIDTag() const { return "(300a,00e5)"; }
89 bool setCompensatorID(std::string parameter);
90
91 // CompensatorMillingToolDiameter (300a,02e8) vr=FL, vm=1, type=3
92 bool getCompensatorMillingToolDiameter(float& parameter) const;
93 std::string getCompensatorMillingToolDiameterTag() const { return "(300a,02e8)"; }
94 bool setCompensatorMillingToolDiameter(float parameter);
95
96 // CompensatorMountingPosition (300a,02e1) vr=CS, vm=1, type=1
97 bool getCompensatorMountingPosition(std::string& parameter) const;
98 std::string getCompensatorMountingPositionTag() const { return "(300a,02e1)"; }
99 bool setCompensatorMountingPosition(std::string parameter);
100
101 // CompensatorNumber (300a,00e4) vr=IS, vm=1, type=1
102 bool getCompensatorNumber(std::string& parameter) const;
103 std::string getCompensatorNumberTag() const { return "(300a,00e4)"; }
104 bool setCompensatorNumber(std::string parameter);
105
106 // CompensatorPixelSpacing (300a,00e9) vr=DS, vm=2, type=1
107 bool getCompensatorPixelSpacing(std::string& parameter) const;
108 std::string getCompensatorPixelSpacingTag() const { return "(300a,00e9)"; }
109 bool setCompensatorPixelSpacing(std::string parameter);
110
111 // CompensatorPosition (300a,00ea) vr=DS, vm=2, type=1
112 bool getCompensatorPosition(std::string& parameter) const;
113 std::string getCompensatorPositionTag() const { return "(300a,00ea)"; }
114 bool setCompensatorPosition(std::string parameter);
115
116 // CompensatorRelativeStoppingPowerRatio (300a,02e7) vr=FL, vm=1, type=3
117 bool getCompensatorRelativeStoppingPowerRatio(float& parameter) const;
118 std::string getCompensatorRelativeStoppingPowerRatioTag() const { return "(300a,02e7)"; }
120
121 // CompensatorRows (300a,00e7) vr=IS, vm=1, type=1
122 bool getCompensatorRows(std::string& parameter) const;
123 std::string getCompensatorRowsTag() const { return "(300a,00e7)"; }
124 bool setCompensatorRows(std::string parameter);
125
126 // CompensatorThicknessData (300a,00ec) vr=DS, vm=1-n, type=1
127 bool getCompensatorThicknessData(std::string& parameter) const;
128 std::string getCompensatorThicknessDataTag() const { return "(300a,00ec)"; }
129 bool setCompensatorThicknessData(std::string parameter);
130
131 // IsocenterToCompensatorDistances (300a,02e6) vr=FL, vm=1-n, type=1C
132 bool getIsocenterToCompensatorDistances(float& parameter) const;
133 std::string getIsocenterToCompensatorDistancesTag() const { return "(300a,02e6)"; }
135
136 // IsocenterToCompensatorTrayDistance (300a,02e4) vr=FL, vm=1, type=1C
137 bool getIsocenterToCompensatorTrayDistance(float& parameter) const;
138 std::string getIsocenterToCompensatorTrayDistanceTag() const { return "(300a,02e4)"; }
140
141 // MaterialID (300a,00e1) vr=SH, vm=1, type=2
142 bool getMaterialID(std::string& parameter) const;
143 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
144 bool setMaterialID(std::string parameter);
145
146
147 private:
148
149 DCMTree::TreePtr _dcmItem;
150
151 };
152
154
156 DcmDRTIonRangeCompensatorSequenceInterface(std::vector<DcmDRTIonRangeCompensatorSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
157
164
167 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
168 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
169 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
170 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
171 bool setAccessoryCode(unsigned long idx, std::string parameter);
172
173 // CompensatorColumnOffset (300a,02e5) vr=FL, vm=1, type=1C
174 bool getCompensatorColumnOffset(unsigned long idx, float& parameter) const;
175 bool getCompensatorColumnOffset(DCMTree::TreePtr item, float& parameter) const;
176 std::string getCompensatorColumnOffsetTag() const { return "(300a,02e5)"; }
177 bool setCompensatorColumnOffset(unsigned long idx, float parameter);
178
179 // CompensatorColumns (300a,00e8) vr=IS, vm=1, type=1
180 bool getCompensatorColumns(unsigned long idx, std::string& parameter) const;
181 bool getCompensatorColumns(DCMTree::TreePtr item, std::string& parameter) const;
182 std::string getCompensatorColumnsTag() const { return "(300a,00e8)"; }
183 bool setCompensatorColumns(unsigned long idx, std::string parameter);
184
185 // CompensatorDivergence (300a,02e0) vr=CS, vm=1, type=1
186 bool getCompensatorDivergence(unsigned long idx, std::string& parameter) const;
187 bool getCompensatorDivergence(DCMTree::TreePtr item, std::string& parameter) const;
188 std::string getCompensatorDivergenceTag() const { return "(300a,02e0)"; }
189 bool setCompensatorDivergence(unsigned long idx, std::string parameter);
190
191 // CompensatorID (300a,00e5) vr=SH, vm=1, type=3
192 bool getCompensatorID(unsigned long idx, std::string& parameter) const;
193 bool getCompensatorID(DCMTree::TreePtr item, std::string& parameter) const;
194 std::string getCompensatorIDTag() const { return "(300a,00e5)"; }
195 bool setCompensatorID(unsigned long idx, std::string parameter);
196
197 // CompensatorMillingToolDiameter (300a,02e8) vr=FL, vm=1, type=3
198 bool getCompensatorMillingToolDiameter(unsigned long idx, float& parameter) const;
200 std::string getCompensatorMillingToolDiameterTag() const { return "(300a,02e8)"; }
201 bool setCompensatorMillingToolDiameter(unsigned long idx, float parameter);
202
203 // CompensatorMountingPosition (300a,02e1) vr=CS, vm=1, type=1
204 bool getCompensatorMountingPosition(unsigned long idx, std::string& parameter) const;
205 bool getCompensatorMountingPosition(DCMTree::TreePtr item, std::string& parameter) const;
206 std::string getCompensatorMountingPositionTag() const { return "(300a,02e1)"; }
207 bool setCompensatorMountingPosition(unsigned long idx, std::string parameter);
208
209 // CompensatorNumber (300a,00e4) vr=IS, vm=1, type=1
210 bool getCompensatorNumber(unsigned long idx, std::string& parameter) const;
211 bool getCompensatorNumber(DCMTree::TreePtr item, std::string& parameter) const;
212 std::string getCompensatorNumberTag() const { return "(300a,00e4)"; }
213 bool setCompensatorNumber(unsigned long idx, std::string parameter);
214
215 // CompensatorPixelSpacing (300a,00e9) vr=DS, vm=2, type=1
216 bool getCompensatorPixelSpacing(unsigned long idx, std::string& parameter) const;
217 bool getCompensatorPixelSpacing(DCMTree::TreePtr item, std::string& parameter) const;
218 std::string getCompensatorPixelSpacingTag() const { return "(300a,00e9)"; }
219 bool setCompensatorPixelSpacing(unsigned long idx, std::string parameter);
220
221 // CompensatorPosition (300a,00ea) vr=DS, vm=2, type=1
222 bool getCompensatorPosition(unsigned long idx, std::string& parameter) const;
223 bool getCompensatorPosition(DCMTree::TreePtr item, std::string& parameter) const;
224 std::string getCompensatorPositionTag() const { return "(300a,00ea)"; }
225 bool setCompensatorPosition(unsigned long idx, std::string parameter);
226
227 // CompensatorRelativeStoppingPowerRatio (300a,02e7) vr=FL, vm=1, type=3
228 bool getCompensatorRelativeStoppingPowerRatio(unsigned long idx, float& parameter) const;
230 std::string getCompensatorRelativeStoppingPowerRatioTag() const { return "(300a,02e7)"; }
231 bool setCompensatorRelativeStoppingPowerRatio(unsigned long idx, float parameter);
232
233 // CompensatorRows (300a,00e7) vr=IS, vm=1, type=1
234 bool getCompensatorRows(unsigned long idx, std::string& parameter) const;
235 bool getCompensatorRows(DCMTree::TreePtr item, std::string& parameter) const;
236 std::string getCompensatorRowsTag() const { return "(300a,00e7)"; }
237 bool setCompensatorRows(unsigned long idx, std::string parameter);
238
239 // CompensatorThicknessData (300a,00ec) vr=DS, vm=1-n, type=1
240 bool getCompensatorThicknessData(unsigned long idx, std::string& parameter) const;
241 bool getCompensatorThicknessData(DCMTree::TreePtr item, std::string& parameter) const;
242 std::string getCompensatorThicknessDataTag() const { return "(300a,00ec)"; }
243 bool setCompensatorThicknessData(unsigned long idx, std::string parameter);
244
245 // IsocenterToCompensatorDistances (300a,02e6) vr=FL, vm=1-n, type=1C
246 bool getIsocenterToCompensatorDistances(unsigned long idx, float& parameter) const;
248 std::string getIsocenterToCompensatorDistancesTag() const { return "(300a,02e6)"; }
249 bool setIsocenterToCompensatorDistances(unsigned long idx, float parameter);
250
251 // IsocenterToCompensatorTrayDistance (300a,02e4) vr=FL, vm=1, type=1C
252 bool getIsocenterToCompensatorTrayDistance(unsigned long idx, float& parameter) const;
254 std::string getIsocenterToCompensatorTrayDistanceTag() const { return "(300a,02e4)"; }
255 bool setIsocenterToCompensatorTrayDistance(unsigned long idx, float parameter);
256
257 // MaterialID (300a,00e1) vr=SH, vm=1, type=2
258 bool getMaterialID(unsigned long idx, std::string& parameter) const;
259 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
260 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
261 bool setMaterialID(unsigned long idx, std::string parameter);
262
263
266 void setSequence(std::vector<DcmDRTIonRangeCompensatorSequenceInterface::Item> dcmSequence) {
267 _itemVec = dcmSequence;
268 }
269
272 std::vector<DcmDRTIonRangeCompensatorSequenceInterface::Item> getSequence() const {
273 return _itemVec;
274 }
275
278 bool hasSequence() const {
279 return (_itemVec.size() != 0);
280 }
281
285 return static_cast<MLint>(_itemVec.size());
286 }
287
291 if (_itemVec.size() > idx) {
292 return _itemVec[idx];
293 }
295 }
296
301 return _itemVec[_itemVec.size()-1];
302 }
303
307
310 bool insertItem(const size_t idx) {
311 if (_itemVec.size() > idx) {
312 std::vector<DcmDRTIonRangeCompensatorSequenceInterface::Item>::iterator it = _itemVec.begin();
313 std::advance(it, idx);
315 return true;
316 }
317 return false;
318 }
319
322 bool removeItem(const size_t idx) {
323 if ( _itemVec.size() > idx ) {
324 std::vector<DcmDRTIonRangeCompensatorSequenceInterface::Item>::iterator it = _itemVec.begin();
325 std::advance(it, idx);
326 _itemVec.erase(it);
327 return true;
328 }
329 return false;
330 }
331
332 protected:
334 std::vector<DcmDRTIonRangeCompensatorSequenceInterface::Item> _itemVec;
335};
336
338
339#endif // __mlDcmDRTIonRangeCompensatorSequenceInterface_H
340
341/* MeVis-Hidden-Components-Start */
342/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getCompensatorRelativeStoppingPowerRatio(float &parameter) const
bool setCompensatorThicknessData(std::string parameter)
bool setCompensatorMountingPosition(std::string parameter)
bool getCompensatorRows(std::string &parameter) const
bool getCompensatorID(std::string &parameter) const
bool getAccessoryCode(std::string &parameter) const
bool getMaterialID(std::string &parameter) const
bool getCompensatorMillingToolDiameter(float &parameter) const
bool getCompensatorColumns(std::string &parameter) const
bool getCompensatorMountingPosition(std::string &parameter) const
bool setCompensatorPixelSpacing(std::string parameter)
bool getIsocenterToCompensatorDistances(float &parameter) const
bool getCompensatorColumnOffset(float &parameter) const
bool getCompensatorDivergence(std::string &parameter) const
bool getIsocenterToCompensatorTrayDistance(float &parameter) const
bool setCompensatorDivergence(std::string parameter)
bool getCompensatorPosition(std::string &parameter) const
bool getCompensatorNumber(std::string &parameter) const
bool getCompensatorPixelSpacing(std::string &parameter) const
bool getCompensatorThicknessData(std::string &parameter) const
Class to provide access to DRTIonRangeCompensatorSequence.
bool getIsocenterToCompensatorDistances(DCMTree::TreePtr item, float &parameter) const
DcmDRTIonRangeCompensatorSequenceInterface(std::vector< DcmDRTIonRangeCompensatorSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getCompensatorMillingToolDiameter(DCMTree::TreePtr item, float &parameter) const
bool getCompensatorThicknessData(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTIonRangeCompensatorSequenceInterface::Item newItem)
bool getCompensatorColumns(unsigned long idx, std::string &parameter) const
bool getCompensatorPosition(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTIonRangeCompensatorSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getCompensatorPixelSpacing(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorMountingPosition(DCMTree::TreePtr item, std::string &parameter) const
bool hasSequence() const
Check if the DRTIonRangeCompensatorSequence is set.
bool getCompensatorNumber(unsigned long idx, std::string &parameter) const
bool setCompensatorPosition(unsigned long idx, std::string parameter)
bool setCompensatorDivergence(unsigned long idx, std::string parameter)
bool getMaterialID(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTIonRangeCompensatorSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setCompensatorID(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getCompensatorMillingToolDiameter(unsigned long idx, float &parameter) const
bool getCompensatorMountingPosition(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTIonRangeCompensatorSequenceInterface::Item > dcmSequence)
Set the DRTIonRangeCompensatorSequence this interface class provides access to.
bool getCompensatorPosition(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTIonRangeCompensatorSequenceInterface::Item > getSequence() const
Return the DRTIonRangeCompensatorSequence this interface class provides access to.
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorRows(unsigned long idx, std::string &parameter) const
bool getCompensatorID(unsigned long idx, std::string &parameter) const
bool setCompensatorPixelSpacing(unsigned long idx, std::string parameter)
bool getCompensatorDivergence(DCMTree::TreePtr item, std::string &parameter) const
bool setCompensatorRelativeStoppingPowerRatio(unsigned long idx, float parameter)
bool setMaterialID(unsigned long idx, std::string parameter)
bool getCompensatorPixelSpacing(unsigned long idx, std::string &parameter) const
bool getCompensatorRelativeStoppingPowerRatio(DCMTree::TreePtr item, float &parameter) const
bool getCompensatorColumnOffset(unsigned long idx, float &parameter) const
bool getCompensatorColumnOffset(DCMTree::TreePtr item, float &parameter) const
bool getCompensatorNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getIsocenterToCompensatorTrayDistance(DCMTree::TreePtr item, float &parameter) const
bool getIsocenterToCompensatorTrayDistance(unsigned long idx, float &parameter) const
bool getCompensatorRelativeStoppingPowerRatio(unsigned long idx, float &parameter) const
bool setIsocenterToCompensatorDistances(unsigned long idx, float parameter)
bool setCompensatorMillingToolDiameter(unsigned long idx, float parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setCompensatorMountingPosition(unsigned long idx, std::string parameter)
bool setCompensatorRows(unsigned long idx, std::string parameter)
bool setIsocenterToCompensatorTrayDistance(unsigned long idx, float parameter)
bool getCompensatorID(DCMTree::TreePtr item, std::string &parameter) const
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
bool getCompensatorDivergence(unsigned long idx, std::string &parameter) const
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
bool setCompensatorNumber(unsigned long idx, std::string parameter)
DcmDRTIonRangeCompensatorSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setCompensatorColumnOffset(unsigned long idx, float parameter)
bool getCompensatorRows(DCMTree::TreePtr item, std::string &parameter) const
bool setCompensatorThicknessData(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getCompensatorThicknessData(DCMTree::TreePtr item, std::string &parameter) const
bool getCompensatorColumns(DCMTree::TreePtr item, std::string &parameter) const
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool getIsocenterToCompensatorDistances(unsigned long idx, float &parameter) const
bool setCompensatorColumns(unsigned long idx, std::string parameter)
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