MeVisLab Toolbox Reference
mlDcmDRTBlockSequenceInRTBeamsModuleInterface.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 __mlDcmDRTBlockSequenceInRTBeamsModuleInterface_H
24#define __mlDcmDRTBlockSequenceInRTBeamsModuleInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTBlockSequenceInRTBeamsModuleInterface.h" //DRTBlockSequenceInRTBeamsModule
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 // BlockData (300a,0106) vr=DS, vm=2-2n, type=2C
72 bool getBlockData(std::string& parameter) const;
73 std::string getBlockDataTag() const { return "(300a,0106)"; }
74 bool setBlockData(std::string parameter);
75
76 // BlockDivergence (300a,00fa) vr=CS, vm=1, type=2C
77 bool getBlockDivergence(std::string& parameter) const;
78 std::string getBlockDivergenceTag() const { return "(300a,00fa)"; }
79 bool setBlockDivergence(std::string parameter);
80
81 // BlockMountingPosition (300a,00fb) vr=CS, vm=1, type=3
82 bool getBlockMountingPosition(std::string& parameter) const;
83 std::string getBlockMountingPositionTag() const { return "(300a,00fb)"; }
84 bool setBlockMountingPosition(std::string parameter);
85
86 // BlockName (300a,00fe) vr=LO, vm=1, type=3
87 bool getBlockName(std::string& parameter) const;
88 std::string getBlockNameTag() const { return "(300a,00fe)"; }
89 bool setBlockName(std::string parameter);
90
91 // BlockNumber (300a,00fc) vr=IS, vm=1, type=1C
92 bool getBlockNumber(std::string& parameter) const;
93 std::string getBlockNumberTag() const { return "(300a,00fc)"; }
94 bool setBlockNumber(std::string parameter);
95
96 // BlockNumberOfPoints (300a,0104) vr=IS, vm=1, type=2C
97 bool getBlockNumberOfPoints(std::string& parameter) const;
98 std::string getBlockNumberOfPointsTag() const { return "(300a,0104)"; }
99 bool setBlockNumberOfPoints(std::string parameter);
100
101 // BlockThickness (300a,0100) vr=DS, vm=1, type=2C
102 bool getBlockThickness(std::string& parameter) const;
103 std::string getBlockThicknessTag() const { return "(300a,0100)"; }
104 bool setBlockThickness(std::string parameter);
105
106 // BlockTransmission (300a,0102) vr=DS, vm=1, type=2C
107 bool getBlockTransmission(std::string& parameter) const;
108 std::string getBlockTransmissionTag() const { return "(300a,0102)"; }
109 bool setBlockTransmission(std::string parameter);
110
111 // BlockTrayID (300a,00f5) vr=SH, vm=1, type=3
112 bool getBlockTrayID(std::string& parameter) const;
113 std::string getBlockTrayIDTag() const { return "(300a,00f5)"; }
114 bool setBlockTrayID(std::string parameter);
115
116 // BlockType (300a,00f8) vr=CS, vm=1, type=1C
117 bool getBlockType(std::string& parameter) const;
118 std::string getBlockTypeTag() const { return "(300a,00f8)"; }
119 bool setBlockType(std::string parameter);
120
121 // MaterialID (300a,00e1) vr=SH, vm=1, type=2C
122 bool getMaterialID(std::string& parameter) const;
123 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
124 bool setMaterialID(std::string parameter);
125
126 // SourceToBlockTrayDistance (300a,00f6) vr=DS, vm=1, type=2C
127 bool getSourceToBlockTrayDistance(std::string& parameter) const;
128 std::string getSourceToBlockTrayDistanceTag() const { return "(300a,00f6)"; }
129 bool setSourceToBlockTrayDistance(std::string parameter);
130
131
132 private:
133
134 DCMTree::TreePtr _dcmItem;
135
136 };
137
139
141 DcmDRTBlockSequenceInRTBeamsModuleInterface(std::vector<DcmDRTBlockSequenceInRTBeamsModuleInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
142
149
152 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
153 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
154 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
156 bool setAccessoryCode(unsigned long idx, std::string parameter);
157
158 // BlockData (300a,0106) vr=DS, vm=2-2n, type=2C
159 bool getBlockData(unsigned long idx, std::string& parameter) const;
160 bool getBlockData(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getBlockDataTag() const { return "(300a,0106)"; }
162 bool setBlockData(unsigned long idx, std::string parameter);
163
164 // BlockDivergence (300a,00fa) vr=CS, vm=1, type=2C
165 bool getBlockDivergence(unsigned long idx, std::string& parameter) const;
166 bool getBlockDivergence(DCMTree::TreePtr item, std::string& parameter) const;
167 std::string getBlockDivergenceTag() const { return "(300a,00fa)"; }
168 bool setBlockDivergence(unsigned long idx, std::string parameter);
169
170 // BlockMountingPosition (300a,00fb) vr=CS, vm=1, type=3
171 bool getBlockMountingPosition(unsigned long idx, std::string& parameter) const;
172 bool getBlockMountingPosition(DCMTree::TreePtr item, std::string& parameter) const;
173 std::string getBlockMountingPositionTag() const { return "(300a,00fb)"; }
174 bool setBlockMountingPosition(unsigned long idx, std::string parameter);
175
176 // BlockName (300a,00fe) vr=LO, vm=1, type=3
177 bool getBlockName(unsigned long idx, std::string& parameter) const;
178 bool getBlockName(DCMTree::TreePtr item, std::string& parameter) const;
179 std::string getBlockNameTag() const { return "(300a,00fe)"; }
180 bool setBlockName(unsigned long idx, std::string parameter);
181
182 // BlockNumber (300a,00fc) vr=IS, vm=1, type=1C
183 bool getBlockNumber(unsigned long idx, std::string& parameter) const;
184 bool getBlockNumber(DCMTree::TreePtr item, std::string& parameter) const;
185 std::string getBlockNumberTag() const { return "(300a,00fc)"; }
186 bool setBlockNumber(unsigned long idx, std::string parameter);
187
188 // BlockNumberOfPoints (300a,0104) vr=IS, vm=1, type=2C
189 bool getBlockNumberOfPoints(unsigned long idx, std::string& parameter) const;
190 bool getBlockNumberOfPoints(DCMTree::TreePtr item, std::string& parameter) const;
191 std::string getBlockNumberOfPointsTag() const { return "(300a,0104)"; }
192 bool setBlockNumberOfPoints(unsigned long idx, std::string parameter);
193
194 // BlockThickness (300a,0100) vr=DS, vm=1, type=2C
195 bool getBlockThickness(unsigned long idx, std::string& parameter) const;
196 bool getBlockThickness(DCMTree::TreePtr item, std::string& parameter) const;
197 std::string getBlockThicknessTag() const { return "(300a,0100)"; }
198 bool setBlockThickness(unsigned long idx, std::string parameter);
199
200 // BlockTransmission (300a,0102) vr=DS, vm=1, type=2C
201 bool getBlockTransmission(unsigned long idx, std::string& parameter) const;
202 bool getBlockTransmission(DCMTree::TreePtr item, std::string& parameter) const;
203 std::string getBlockTransmissionTag() const { return "(300a,0102)"; }
204 bool setBlockTransmission(unsigned long idx, std::string parameter);
205
206 // BlockTrayID (300a,00f5) vr=SH, vm=1, type=3
207 bool getBlockTrayID(unsigned long idx, std::string& parameter) const;
208 bool getBlockTrayID(DCMTree::TreePtr item, std::string& parameter) const;
209 std::string getBlockTrayIDTag() const { return "(300a,00f5)"; }
210 bool setBlockTrayID(unsigned long idx, std::string parameter);
211
212 // BlockType (300a,00f8) vr=CS, vm=1, type=1C
213 bool getBlockType(unsigned long idx, std::string& parameter) const;
214 bool getBlockType(DCMTree::TreePtr item, std::string& parameter) const;
215 std::string getBlockTypeTag() const { return "(300a,00f8)"; }
216 bool setBlockType(unsigned long idx, std::string parameter);
217
218 // MaterialID (300a,00e1) vr=SH, vm=1, type=2C
219 bool getMaterialID(unsigned long idx, std::string& parameter) const;
220 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
221 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
222 bool setMaterialID(unsigned long idx, std::string parameter);
223
224 // SourceToBlockTrayDistance (300a,00f6) vr=DS, vm=1, type=2C
225 bool getSourceToBlockTrayDistance(unsigned long idx, std::string& parameter) const;
226 bool getSourceToBlockTrayDistance(DCMTree::TreePtr item, std::string& parameter) const;
227 std::string getSourceToBlockTrayDistanceTag() const { return "(300a,00f6)"; }
228 bool setSourceToBlockTrayDistance(unsigned long idx, std::string parameter);
229
230
233 void setSequence(std::vector<DcmDRTBlockSequenceInRTBeamsModuleInterface::Item> dcmSequence) {
234 _itemVec = dcmSequence;
235 }
236
239 std::vector<DcmDRTBlockSequenceInRTBeamsModuleInterface::Item> getSequence() const {
240 return _itemVec;
241 }
242
245 bool hasSequence() const {
246 return (_itemVec.size() != 0);
247 }
248
252 return static_cast<MLint>(_itemVec.size());
253 }
254
258 if (_itemVec.size() > idx) {
259 return _itemVec[idx];
260 }
262 }
263
268 return _itemVec[_itemVec.size()-1];
269 }
270
274
277 bool insertItem(const size_t idx) {
278 if (_itemVec.size() > idx) {
279 std::vector<DcmDRTBlockSequenceInRTBeamsModuleInterface::Item>::iterator it = _itemVec.begin();
280 std::advance(it, idx);
282 return true;
283 }
284 return false;
285 }
286
289 bool removeItem(const size_t idx) {
290 if ( _itemVec.size() > idx ) {
291 std::vector<DcmDRTBlockSequenceInRTBeamsModuleInterface::Item>::iterator it = _itemVec.begin();
292 std::advance(it, idx);
293 _itemVec.erase(it);
294 return true;
295 }
296 return false;
297 }
298
299 protected:
301 std::vector<DcmDRTBlockSequenceInRTBeamsModuleInterface::Item> _itemVec;
302};
303
305
306#endif // __mlDcmDRTBlockSequenceInRTBeamsModuleInterface_H
307
308/* MeVis-Hidden-Components-Start */
309/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getAccessoryCode(std::string &parameter) const
bool getBlockNumber(std::string &parameter) const
bool getBlockTrayID(std::string &parameter) const
bool getBlockMountingPosition(std::string &parameter) const
bool getBlockName(std::string &parameter) const
bool getMaterialID(std::string &parameter) const
bool getBlockType(std::string &parameter) const
bool setSourceToBlockTrayDistance(std::string parameter)
bool getBlockData(std::string &parameter) const
bool getBlockTransmission(std::string &parameter) const
bool getBlockDivergence(std::string &parameter) const
bool getBlockThickness(std::string &parameter) const
bool getBlockNumberOfPoints(std::string &parameter) const
bool getSourceToBlockTrayDistance(std::string &parameter) const
Class to provide access to DRTBlockSequenceInRTBeamsModule.
bool setMaterialID(unsigned long idx, std::string parameter)
bool getSourceToBlockTrayDistance(unsigned long idx, std::string &parameter) const
bool getBlockThickness(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTBlockSequenceInRTBeamsModuleInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getBlockMountingPosition(unsigned long idx, std::string &parameter) const
bool getSourceToBlockTrayDistance(DCMTree::TreePtr item, std::string &parameter) const
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockMountingPosition(DCMTree::TreePtr item, std::string &parameter) const
bool setBlockMountingPosition(unsigned long idx, std::string parameter)
bool setBlockTrayID(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getBlockType(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockName(unsigned long idx, std::string &parameter) const
bool setBlockNumberOfPoints(unsigned long idx, std::string parameter)
bool getBlockNumber(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setBlockData(unsigned long idx, std::string parameter)
bool setBlockThickness(unsigned long idx, std::string parameter)
bool getBlockThickness(unsigned long idx, std::string &parameter) const
bool getMaterialID(unsigned long idx, std::string &parameter) const
bool hasSequence() const
Check if the DRTBlockSequenceInRTBeamsModule is set.
bool getBlockDivergence(DCMTree::TreePtr item, std::string &parameter) const
bool setBlockType(unsigned long idx, std::string parameter)
bool setBlockTransmission(unsigned long idx, std::string parameter)
bool getBlockTrayID(unsigned long idx, std::string &parameter) const
bool getBlockData(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockNumberOfPoints(unsigned long idx, std::string &parameter) const
bool getBlockDivergence(unsigned long idx, std::string &parameter) const
bool getBlockTrayID(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockType(unsigned long idx, std::string &parameter) const
bool setAccessoryCode(unsigned long idx, std::string parameter)
DcmDRTBlockSequenceInRTBeamsModuleInterface(std::vector< DcmDRTBlockSequenceInRTBeamsModuleInterface::Item > dcmSequence)
Default Constructor.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
std::vector< DcmDRTBlockSequenceInRTBeamsModuleInterface::Item > getSequence() const
Return the DRTBlockSequenceInRTBeamsModule this interface class provides access to.
DcmDRTBlockSequenceInRTBeamsModuleInterface::Item & addItem()
Adds a new item to the sequence.
bool getBlockTransmission(unsigned long idx, std::string &parameter) const
bool setBlockDivergence(unsigned long idx, std::string parameter)
bool getBlockNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockData(unsigned long idx, std::string &parameter) const
bool getBlockName(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockNumberOfPoints(DCMTree::TreePtr item, std::string &parameter) const
bool setBlockName(unsigned long idx, std::string parameter)
bool setSourceToBlockTrayDistance(unsigned long idx, std::string parameter)
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTBlockSequenceInRTBeamsModuleInterface::Item newItem)
bool getBlockTransmission(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTBlockSequenceInRTBeamsModuleInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setBlockNumber(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTBlockSequenceInRTBeamsModuleInterface::Item > dcmSequence)
Set the DRTBlockSequenceInRTBeamsModule this interface class provides access to.
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