MeVisLab Toolbox Reference
mlDcmDRTBlockSequenceInRTImageModuleInterface.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 __mlDcmDRTBlockSequenceInRTImageModuleInterface_H
24#define __mlDcmDRTBlockSequenceInRTImageModuleInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTBlockSequenceInRTImageModuleInterface.h" //DRTBlockSequenceInRTImageModule
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 // BlockData (300a,0106) vr=DS, vm=2-2n, type=2C
67 bool getBlockData(std::string& parameter) const;
68 std::string getBlockDataTag() const { return "(300a,0106)"; }
69 bool setBlockData(std::string parameter);
70
71 // BlockDivergence (300a,00fa) vr=CS, vm=1, type=2C
72 bool getBlockDivergence(std::string& parameter) const;
73 std::string getBlockDivergenceTag() const { return "(300a,00fa)"; }
74 bool setBlockDivergence(std::string parameter);
75
76 // BlockMountingPosition (300a,00fb) vr=CS, vm=1, type=3
77 bool getBlockMountingPosition(std::string& parameter) const;
78 std::string getBlockMountingPositionTag() const { return "(300a,00fb)"; }
79 bool setBlockMountingPosition(std::string parameter);
80
81 // BlockName (300a,00fe) vr=LO, vm=1, type=3
82 bool getBlockName(std::string& parameter) const;
83 std::string getBlockNameTag() const { return "(300a,00fe)"; }
84 bool setBlockName(std::string parameter);
85
86 // BlockNumber (300a,00fc) vr=IS, vm=1, type=1C
87 bool getBlockNumber(std::string& parameter) const;
88 std::string getBlockNumberTag() const { return "(300a,00fc)"; }
89 bool setBlockNumber(std::string parameter);
90
91 // BlockNumberOfPoints (300a,0104) vr=IS, vm=1, type=2C
92 bool getBlockNumberOfPoints(std::string& parameter) const;
93 std::string getBlockNumberOfPointsTag() const { return "(300a,0104)"; }
94 bool setBlockNumberOfPoints(std::string parameter);
95
96 // BlockThickness (300a,0100) vr=DS, vm=1, type=3
97 bool getBlockThickness(std::string& parameter) const;
98 std::string getBlockThicknessTag() const { return "(300a,0100)"; }
99 bool setBlockThickness(std::string parameter);
100
101 // BlockTrayID (300a,00f5) vr=SH, vm=1, type=3
102 bool getBlockTrayID(std::string& parameter) const;
103 std::string getBlockTrayIDTag() const { return "(300a,00f5)"; }
104 bool setBlockTrayID(std::string parameter);
105
106 // BlockType (300a,00f8) vr=CS, vm=1, type=1C
107 bool getBlockType(std::string& parameter) const;
108 std::string getBlockTypeTag() const { return "(300a,00f8)"; }
109 bool setBlockType(std::string parameter);
110
111 // MaterialID (300a,00e1) vr=SH, vm=1, type=2C
112 bool getMaterialID(std::string& parameter) const;
113 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
114 bool setMaterialID(std::string parameter);
115
116 // SourceToBlockTrayDistance (300a,00f6) vr=DS, vm=1, type=2C
117 bool getSourceToBlockTrayDistance(std::string& parameter) const;
118 std::string getSourceToBlockTrayDistanceTag() const { return "(300a,00f6)"; }
119 bool setSourceToBlockTrayDistance(std::string parameter);
120
121
122 private:
123
124 DCMTree::TreePtr _dcmItem;
125
126 };
127
129
131 DcmDRTBlockSequenceInRTImageModuleInterface(std::vector<DcmDRTBlockSequenceInRTImageModuleInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
132
139
142 // BlockData (300a,0106) vr=DS, vm=2-2n, type=2C
143 bool getBlockData(unsigned long idx, std::string& parameter) const;
144 bool getBlockData(DCMTree::TreePtr item, std::string& parameter) const;
145 std::string getBlockDataTag() const { return "(300a,0106)"; }
146 bool setBlockData(unsigned long idx, std::string parameter);
147
148 // BlockDivergence (300a,00fa) vr=CS, vm=1, type=2C
149 bool getBlockDivergence(unsigned long idx, std::string& parameter) const;
150 bool getBlockDivergence(DCMTree::TreePtr item, std::string& parameter) const;
151 std::string getBlockDivergenceTag() const { return "(300a,00fa)"; }
152 bool setBlockDivergence(unsigned long idx, std::string parameter);
153
154 // BlockMountingPosition (300a,00fb) vr=CS, vm=1, type=3
155 bool getBlockMountingPosition(unsigned long idx, std::string& parameter) const;
156 bool getBlockMountingPosition(DCMTree::TreePtr item, std::string& parameter) const;
157 std::string getBlockMountingPositionTag() const { return "(300a,00fb)"; }
158 bool setBlockMountingPosition(unsigned long idx, std::string parameter);
159
160 // BlockName (300a,00fe) vr=LO, vm=1, type=3
161 bool getBlockName(unsigned long idx, std::string& parameter) const;
162 bool getBlockName(DCMTree::TreePtr item, std::string& parameter) const;
163 std::string getBlockNameTag() const { return "(300a,00fe)"; }
164 bool setBlockName(unsigned long idx, std::string parameter);
165
166 // BlockNumber (300a,00fc) vr=IS, vm=1, type=1C
167 bool getBlockNumber(unsigned long idx, std::string& parameter) const;
168 bool getBlockNumber(DCMTree::TreePtr item, std::string& parameter) const;
169 std::string getBlockNumberTag() const { return "(300a,00fc)"; }
170 bool setBlockNumber(unsigned long idx, std::string parameter);
171
172 // BlockNumberOfPoints (300a,0104) vr=IS, vm=1, type=2C
173 bool getBlockNumberOfPoints(unsigned long idx, std::string& parameter) const;
174 bool getBlockNumberOfPoints(DCMTree::TreePtr item, std::string& parameter) const;
175 std::string getBlockNumberOfPointsTag() const { return "(300a,0104)"; }
176 bool setBlockNumberOfPoints(unsigned long idx, std::string parameter);
177
178 // BlockThickness (300a,0100) vr=DS, vm=1, type=3
179 bool getBlockThickness(unsigned long idx, std::string& parameter) const;
180 bool getBlockThickness(DCMTree::TreePtr item, std::string& parameter) const;
181 std::string getBlockThicknessTag() const { return "(300a,0100)"; }
182 bool setBlockThickness(unsigned long idx, std::string parameter);
183
184 // BlockTrayID (300a,00f5) vr=SH, vm=1, type=3
185 bool getBlockTrayID(unsigned long idx, std::string& parameter) const;
186 bool getBlockTrayID(DCMTree::TreePtr item, std::string& parameter) const;
187 std::string getBlockTrayIDTag() const { return "(300a,00f5)"; }
188 bool setBlockTrayID(unsigned long idx, std::string parameter);
189
190 // BlockType (300a,00f8) vr=CS, vm=1, type=1C
191 bool getBlockType(unsigned long idx, std::string& parameter) const;
192 bool getBlockType(DCMTree::TreePtr item, std::string& parameter) const;
193 std::string getBlockTypeTag() const { return "(300a,00f8)"; }
194 bool setBlockType(unsigned long idx, std::string parameter);
195
196 // MaterialID (300a,00e1) vr=SH, vm=1, type=2C
197 bool getMaterialID(unsigned long idx, std::string& parameter) const;
198 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
199 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
200 bool setMaterialID(unsigned long idx, std::string parameter);
201
202 // SourceToBlockTrayDistance (300a,00f6) vr=DS, vm=1, type=2C
203 bool getSourceToBlockTrayDistance(unsigned long idx, std::string& parameter) const;
204 bool getSourceToBlockTrayDistance(DCMTree::TreePtr item, std::string& parameter) const;
205 std::string getSourceToBlockTrayDistanceTag() const { return "(300a,00f6)"; }
206 bool setSourceToBlockTrayDistance(unsigned long idx, std::string parameter);
207
208
211 void setSequence(std::vector<DcmDRTBlockSequenceInRTImageModuleInterface::Item> dcmSequence) {
212 _itemVec = dcmSequence;
213 }
214
217 std::vector<DcmDRTBlockSequenceInRTImageModuleInterface::Item> getSequence() const {
218 return _itemVec;
219 }
220
223 bool hasSequence() const {
224 return (_itemVec.size() != 0);
225 }
226
230 return static_cast<MLint>(_itemVec.size());
231 }
232
236 if (_itemVec.size() > idx) {
237 return _itemVec[idx];
238 }
240 }
241
246 return _itemVec[_itemVec.size()-1];
247 }
248
252
255 bool insertItem(const size_t idx) {
256 if (_itemVec.size() > idx) {
257 std::vector<DcmDRTBlockSequenceInRTImageModuleInterface::Item>::iterator it = _itemVec.begin();
258 std::advance(it, idx);
260 return true;
261 }
262 return false;
263 }
264
267 bool removeItem(const size_t idx) {
268 if ( _itemVec.size() > idx ) {
269 std::vector<DcmDRTBlockSequenceInRTImageModuleInterface::Item>::iterator it = _itemVec.begin();
270 std::advance(it, idx);
271 _itemVec.erase(it);
272 return true;
273 }
274 return false;
275 }
276
277 protected:
279 std::vector<DcmDRTBlockSequenceInRTImageModuleInterface::Item> _itemVec;
280};
281
283
284#endif // __mlDcmDRTBlockSequenceInRTImageModuleInterface_H
285
286/* MeVis-Hidden-Components-Start */
287/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getBlockThickness(std::string &parameter) const
bool getBlockTrayID(std::string &parameter) const
bool getBlockNumber(std::string &parameter) const
bool setSourceToBlockTrayDistance(std::string parameter)
bool getMaterialID(std::string &parameter) const
bool getBlockName(std::string &parameter) const
bool getBlockNumberOfPoints(std::string &parameter) const
bool getBlockDivergence(std::string &parameter) const
bool getBlockData(std::string &parameter) const
bool getBlockType(std::string &parameter) const
bool getSourceToBlockTrayDistance(std::string &parameter) const
bool getBlockMountingPosition(std::string &parameter) const
Class to provide access to DRTBlockSequenceInRTImageModule.
bool setBlockData(unsigned long idx, std::string parameter)
bool getBlockNumberOfPoints(DCMTree::TreePtr item, std::string &parameter) const
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool setSourceToBlockTrayDistance(unsigned long idx, std::string parameter)
bool getBlockDivergence(unsigned long idx, std::string &parameter) const
bool getBlockDivergence(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceToBlockTrayDistance(DCMTree::TreePtr item, std::string &parameter) const
bool getMaterialID(unsigned long idx, std::string &parameter) const
bool setBlockTrayID(unsigned long idx, std::string parameter)
std::vector< DcmDRTBlockSequenceInRTImageModuleInterface::Item > getSequence() const
Return the DRTBlockSequenceInRTImageModule this interface class provides access to.
bool getBlockType(unsigned long idx, std::string &parameter) const
bool getBlockName(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockData(unsigned long idx, std::string &parameter) const
DcmDRTBlockSequenceInRTImageModuleInterface::Item & addItem()
Adds a new item to the sequence.
bool setBlockType(unsigned long idx, std::string parameter)
bool getBlockNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockMountingPosition(unsigned long idx, std::string &parameter) const
bool getBlockTrayID(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockThickness(unsigned long idx, std::string &parameter) const
bool getBlockTrayID(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool setBlockName(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setBlockDivergence(unsigned long idx, std::string parameter)
void addItem(DcmDRTBlockSequenceInRTImageModuleInterface::Item newItem)
bool getBlockName(unsigned long idx, std::string &parameter) const
bool setBlockMountingPosition(unsigned long idx, std::string parameter)
bool setBlockNumber(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool hasSequence() const
Check if the DRTBlockSequenceInRTImageModule is set.
bool getBlockMountingPosition(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTBlockSequenceInRTImageModuleInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setBlockNumberOfPoints(unsigned long idx, std::string parameter)
bool getBlockNumber(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTBlockSequenceInRTImageModuleInterface::Item > dcmSequence)
Set the DRTBlockSequenceInRTImageModule this interface class provides access to.
bool getBlockNumberOfPoints(unsigned long idx, std::string &parameter) const
DcmDRTBlockSequenceInRTImageModuleInterface(std::vector< DcmDRTBlockSequenceInRTImageModuleInterface::Item > dcmSequence)
Default Constructor.
bool setMaterialID(unsigned long idx, std::string parameter)
bool getBlockThickness(DCMTree::TreePtr item, std::string &parameter) const
bool setBlockThickness(unsigned long idx, std::string parameter)
bool getBlockType(DCMTree::TreePtr item, std::string &parameter) const
bool getBlockData(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceToBlockTrayDistance(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTBlockSequenceInRTImageModuleInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
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