MeVisLab Toolbox Reference
mlDcmDRTIonBlockSequenceInterface.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 __mlDcmDRTIonBlockSequenceInterface_H
24#define __mlDcmDRTIonBlockSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTIonBlockSequenceInterface.h" //DRTIonBlockSequence
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=1
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=1
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=1
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=1
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=1
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=1
102 bool getBlockThickness(std::string& parameter) const;
103 std::string getBlockThicknessTag() const { return "(300a,0100)"; }
104 bool setBlockThickness(std::string parameter);
105
106 // BlockTrayID (300a,00f5) vr=SH, vm=1, type=3
107 bool getBlockTrayID(std::string& parameter) const;
108 std::string getBlockTrayIDTag() const { return "(300a,00f5)"; }
109 bool setBlockTrayID(std::string parameter);
110
111 // BlockType (300a,00f8) vr=CS, vm=1, type=1
112 bool getBlockType(std::string& parameter) const;
113 std::string getBlockTypeTag() const { return "(300a,00f8)"; }
114 bool setBlockType(std::string parameter);
115
116 // IsocenterToBlockTrayDistance (300a,00f7) vr=FL, vm=1, type=1
117 bool getIsocenterToBlockTrayDistance(float& parameter) const;
118 std::string getIsocenterToBlockTrayDistanceTag() const { return "(300a,00f7)"; }
119 bool setIsocenterToBlockTrayDistance(float parameter);
120
121 // MaterialID (300a,00e1) vr=SH, vm=1, type=2
122 bool getMaterialID(std::string& parameter) const;
123 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
124 bool setMaterialID(std::string parameter);
125
126
127 private:
128
129 DCMTree::TreePtr _dcmItem;
130
131 };
132
134
136 DcmDRTIonBlockSequenceInterface(std::vector<DcmDRTIonBlockSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
137
139 for(size_t i=0; i < treePtrSeq.size(); i++)
140 {
142 }
143 }
144
147 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
148 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
149 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
150 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
151 bool setAccessoryCode(unsigned long idx, std::string parameter);
152
153 // BlockData (300a,0106) vr=DS, vm=2-2n, type=1
154 bool getBlockData(unsigned long idx, std::string& parameter) const;
155 bool getBlockData(DCMTree::TreePtr item, std::string& parameter) const;
156 std::string getBlockDataTag() const { return "(300a,0106)"; }
157 bool setBlockData(unsigned long idx, std::string parameter);
158
159 // BlockDivergence (300a,00fa) vr=CS, vm=1, type=1
160 bool getBlockDivergence(unsigned long idx, std::string& parameter) const;
161 bool getBlockDivergence(DCMTree::TreePtr item, std::string& parameter) const;
162 std::string getBlockDivergenceTag() const { return "(300a,00fa)"; }
163 bool setBlockDivergence(unsigned long idx, std::string parameter);
164
165 // BlockMountingPosition (300a,00fb) vr=CS, vm=1, type=1
166 bool getBlockMountingPosition(unsigned long idx, std::string& parameter) const;
167 bool getBlockMountingPosition(DCMTree::TreePtr item, std::string& parameter) const;
168 std::string getBlockMountingPositionTag() const { return "(300a,00fb)"; }
169 bool setBlockMountingPosition(unsigned long idx, std::string parameter);
170
171 // BlockName (300a,00fe) vr=LO, vm=1, type=3
172 bool getBlockName(unsigned long idx, std::string& parameter) const;
173 bool getBlockName(DCMTree::TreePtr item, std::string& parameter) const;
174 std::string getBlockNameTag() const { return "(300a,00fe)"; }
175 bool setBlockName(unsigned long idx, std::string parameter);
176
177 // BlockNumber (300a,00fc) vr=IS, vm=1, type=1
178 bool getBlockNumber(unsigned long idx, std::string& parameter) const;
179 bool getBlockNumber(DCMTree::TreePtr item, std::string& parameter) const;
180 std::string getBlockNumberTag() const { return "(300a,00fc)"; }
181 bool setBlockNumber(unsigned long idx, std::string parameter);
182
183 // BlockNumberOfPoints (300a,0104) vr=IS, vm=1, type=1
184 bool getBlockNumberOfPoints(unsigned long idx, std::string& parameter) const;
185 bool getBlockNumberOfPoints(DCMTree::TreePtr item, std::string& parameter) const;
186 std::string getBlockNumberOfPointsTag() const { return "(300a,0104)"; }
187 bool setBlockNumberOfPoints(unsigned long idx, std::string parameter);
188
189 // BlockThickness (300a,0100) vr=DS, vm=1, type=1
190 bool getBlockThickness(unsigned long idx, std::string& parameter) const;
191 bool getBlockThickness(DCMTree::TreePtr item, std::string& parameter) const;
192 std::string getBlockThicknessTag() const { return "(300a,0100)"; }
193 bool setBlockThickness(unsigned long idx, std::string parameter);
194
195 // BlockTrayID (300a,00f5) vr=SH, vm=1, type=3
196 bool getBlockTrayID(unsigned long idx, std::string& parameter) const;
197 bool getBlockTrayID(DCMTree::TreePtr item, std::string& parameter) const;
198 std::string getBlockTrayIDTag() const { return "(300a,00f5)"; }
199 bool setBlockTrayID(unsigned long idx, std::string parameter);
200
201 // BlockType (300a,00f8) vr=CS, vm=1, type=1
202 bool getBlockType(unsigned long idx, std::string& parameter) const;
203 bool getBlockType(DCMTree::TreePtr item, std::string& parameter) const;
204 std::string getBlockTypeTag() const { return "(300a,00f8)"; }
205 bool setBlockType(unsigned long idx, std::string parameter);
206
207 // IsocenterToBlockTrayDistance (300a,00f7) vr=FL, vm=1, type=1
208 bool getIsocenterToBlockTrayDistance(unsigned long idx, float& parameter) const;
210 std::string getIsocenterToBlockTrayDistanceTag() const { return "(300a,00f7)"; }
211 bool setIsocenterToBlockTrayDistance(unsigned long idx, float parameter);
212
213 // MaterialID (300a,00e1) vr=SH, vm=1, type=2
214 bool getMaterialID(unsigned long idx, std::string& parameter) const;
215 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
216 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
217 bool setMaterialID(unsigned long idx, std::string parameter);
218
219
222 void setSequence(std::vector<DcmDRTIonBlockSequenceInterface::Item> dcmSequence) {
223 _itemVec = dcmSequence;
224 }
225
228 std::vector<DcmDRTIonBlockSequenceInterface::Item> getSequence() const {
229 return _itemVec;
230 }
231
234 bool hasSequence() const {
235 return (_itemVec.size() != 0);
236 }
237
241 return static_cast<MLint>(_itemVec.size());
242 }
243
247 if (_itemVec.size() > idx) {
248 return _itemVec[idx];
249 }
251 }
252
256 _itemVec.push_back(DcmDRTIonBlockSequenceInterface::Item());
257 return _itemVec[_itemVec.size()-1];
258 }
259
261 _itemVec.push_back(newItem);
262 }
263
266 bool insertItem(const size_t idx) {
267 if (_itemVec.size() > idx) {
268 std::vector<DcmDRTIonBlockSequenceInterface::Item>::iterator it = _itemVec.begin();
269 std::advance(it, idx);
270 _itemVec.insert(it, DcmDRTIonBlockSequenceInterface::Item());
271 return true;
272 }
273 return false;
274 }
275
278 bool removeItem(const size_t idx) {
279 if ( _itemVec.size() > idx ) {
280 std::vector<DcmDRTIonBlockSequenceInterface::Item>::iterator it = _itemVec.begin();
281 std::advance(it, idx);
282 _itemVec.erase(it);
283 return true;
284 }
285 return false;
286 }
287
288 protected:
290 std::vector<DcmDRTIonBlockSequenceInterface::Item> _itemVec;
291};
292
294
295#endif // __mlDcmDRTIonBlockSequenceInterface_H
296
297/* MeVis-Hidden-Components-Start */
298/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setBlockNumber(std::string parameter)
bool getBlockNumberOfPoints(std::string &parameter) const
bool getBlockDivergence(std::string &parameter) const
bool getBlockName(std::string &parameter) const
bool setBlockTrayID(std::string parameter)
bool setMaterialID(std::string parameter)
bool getBlockThickness(std::string &parameter) const
bool setBlockName(std::string parameter)
bool getAccessoryCode(std::string &parameter) const
bool getBlockMountingPosition(std::string &parameter) const
bool setIsocenterToBlockTrayDistance(float parameter)
bool setBlockNumberOfPoints(std::string parameter)
bool getBlockData(std::string &parameter) const
bool getMaterialID(std::string &parameter) const
bool getBlockNumber(std::string &parameter) const
bool setBlockType(std::string parameter)
bool setBlockDivergence(std::string parameter)
bool getBlockType(std::string &parameter) const
bool getBlockTrayID(std::string &parameter) const
bool setBlockData(std::string parameter)
bool setBlockThickness(std::string parameter)
bool setBlockMountingPosition(std::string parameter)
bool getIsocenterToBlockTrayDistance(float &parameter) const
bool setAccessoryCode(std::string parameter)
Class to provide access to DRTIonBlockSequence.
bool getMaterialID(unsigned long idx, std::string &parameter) const
DcmDRTIonBlockSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
DcmDRTIonBlockSequenceInterface(std::vector< DcmDRTIonBlockSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getIsocenterToBlockTrayDistance(unsigned long idx, float &parameter) const
bool setBlockNumberOfPoints(unsigned long idx, std::string parameter)
bool setBlockTrayID(unsigned long idx, std::string parameter)
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setIsocenterToBlockTrayDistance(unsigned long idx, float parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockDivergence(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockName(DCMTree::TreePtr item, std::string &parameter) const
bool getIsocenterToBlockTrayDistance(DCMTree::TreePtr item, float &parameter) const
bool setBlockMountingPosition(unsigned long idx, std::string parameter)
DcmDRTIonBlockSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getBlockData(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockThickness(DCMTree::TreePtr item, std::string &parameter) const
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool getBlockData(unsigned long idx, std::string &parameter) const
virtual ~DcmDRTIonBlockSequenceInterface()
Default virtual Destructor.
bool getBlockNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockNumberOfPoints(unsigned long idx, std::string &parameter) const
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
bool hasSequence() const
Check if the DRTIonBlockSequence is set.
bool setBlockName(unsigned long idx, std::string parameter)
bool setBlockType(unsigned long idx, std::string parameter)
bool getBlockMountingPosition(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockType(unsigned long idx, std::string &parameter) const
bool getBlockNumberOfPoints(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockType(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockMountingPosition(unsigned long idx, std::string &parameter) const
bool setMaterialID(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getBlockNumber(unsigned long idx, std::string &parameter) const
DcmDRTIonBlockSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
std::vector< DcmDRTIonBlockSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
std::vector< DcmDRTIonBlockSequenceInterface::Item > getSequence() const
Return the DRTIonBlockSequence this interface class provides access to.
bool getBlockTrayID(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockName(unsigned long idx, std::string &parameter) const
bool setBlockDivergence(unsigned long idx, std::string parameter)
bool getBlockThickness(unsigned long idx, std::string &parameter) const
bool setBlockData(unsigned long idx, std::string parameter)
bool getBlockDivergence(unsigned long idx, std::string &parameter) const
bool setBlockThickness(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTIonBlockSequenceInterface::Item > dcmSequence)
Set the DRTIonBlockSequence this interface class provides access to.
void addItem(DcmDRTIonBlockSequenceInterface::Item newItem)
bool getBlockTrayID(unsigned long idx, std::string &parameter) const
bool setBlockNumber(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