MeVisLab Toolbox Reference
mlDcmDRTSourceSequenceInterface.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 __mlDcmDRTSourceSequenceInterface_H
24#define __mlDcmDRTSourceSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTSourceSequenceInterface.h" //DRTSourceSequence
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 // ActiveSourceDiameter (300a,0218) vr=DS, vm=1, type=3
67 bool getActiveSourceDiameter(std::string& parameter) const;
68 std::string getActiveSourceDiameterTag() const { return "(300a,0218)"; }
69 bool setActiveSourceDiameter(std::string parameter);
70
71 // ActiveSourceLength (300a,021a) vr=DS, vm=1, type=3
72 bool getActiveSourceLength(std::string& parameter) const;
73 std::string getActiveSourceLengthTag() const { return "(300a,021a)"; }
74 bool setActiveSourceLength(std::string parameter);
75
76 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
77 bool getMaterialID(std::string& parameter) const;
78 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
79 bool setMaterialID(std::string parameter);
80
81 // ReferenceAirKermaRate (300a,022a) vr=DS, vm=1, type=1
82 bool getReferenceAirKermaRate(std::string& parameter) const;
83 std::string getReferenceAirKermaRateTag() const { return "(300a,022a)"; }
84 bool setReferenceAirKermaRate(std::string parameter);
85
86 // SourceEncapsulationNominalThickness (300a,0222) vr=DS, vm=1, type=3
87 bool getSourceEncapsulationNominalThickness(std::string& parameter) const;
88 std::string getSourceEncapsulationNominalThicknessTag() const { return "(300a,0222)"; }
89 bool setSourceEncapsulationNominalThickness(std::string parameter);
90
91 // SourceEncapsulationNominalTransmission (300a,0224) vr=DS, vm=1, type=3
92 bool getSourceEncapsulationNominalTransmission(std::string& parameter) const;
93 std::string getSourceEncapsulationNominalTransmissionTag() const { return "(300a,0224)"; }
94 bool setSourceEncapsulationNominalTransmission(std::string parameter);
95
96 // SourceIsotopeHalfLife (300a,0228) vr=DS, vm=1, type=1
97 bool getSourceIsotopeHalfLife(std::string& parameter) const;
98 std::string getSourceIsotopeHalfLifeTag() const { return "(300a,0228)"; }
99 bool setSourceIsotopeHalfLife(std::string parameter);
100
101 // SourceIsotopeName (300a,0226) vr=LO, vm=1, type=1
102 bool getSourceIsotopeName(std::string& parameter) const;
103 std::string getSourceIsotopeNameTag() const { return "(300a,0226)"; }
104 bool setSourceIsotopeName(std::string parameter);
105
106 // SourceManufacturer (300a,0216) vr=LO, vm=1, type=3
107 bool getSourceManufacturer(std::string& parameter) const;
108 std::string getSourceManufacturerTag() const { return "(300a,0216)"; }
109 bool setSourceManufacturer(std::string parameter);
110
111 // SourceNumber (300a,0212) vr=IS, vm=1, type=1
112 bool getSourceNumber(std::string& parameter) const;
113 std::string getSourceNumberTag() const { return "(300a,0212)"; }
114 bool setSourceNumber(std::string parameter);
115
116 // SourceStrength (300a,022b) vr=DS, vm=1, type=1C
117 bool getSourceStrength(std::string& parameter) const;
118 std::string getSourceStrengthTag() const { return "(300a,022b)"; }
119 bool setSourceStrength(std::string parameter);
120
121 // SourceStrengthReferenceDate (300a,022c) vr=DA, vm=1, type=1
122 bool getSourceStrengthReferenceDate(std::string& parameter) const;
123 std::string getSourceStrengthReferenceDateTag() const { return "(300a,022c)"; }
124 bool setSourceStrengthReferenceDate(std::string parameter);
125
126 // SourceStrengthReferenceTime (300a,022e) vr=TM, vm=1, type=1
127 bool getSourceStrengthReferenceTime(std::string& parameter) const;
128 std::string getSourceStrengthReferenceTimeTag() const { return "(300a,022e)"; }
129 bool setSourceStrengthReferenceTime(std::string parameter);
130
131 // SourceStrengthUnits (300a,0229) vr=CS, vm=1, type=1C
132 bool getSourceStrengthUnits(std::string& parameter) const;
133 std::string getSourceStrengthUnitsTag() const { return "(300a,0229)"; }
134 bool setSourceStrengthUnits(std::string parameter);
135
136 // SourceType (300a,0214) vr=CS, vm=1, type=1
137 bool getSourceType(std::string& parameter) const;
138 std::string getSourceTypeTag() const { return "(300a,0214)"; }
139 bool setSourceType(std::string parameter);
140
141
142 private:
143
144 DCMTree::TreePtr _dcmItem;
145
146 };
147
149
151 DcmDRTSourceSequenceInterface(std::vector<DcmDRTSourceSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
152
154 for(size_t i=0; i < treePtrSeq.size(); i++)
155 {
157 }
158 }
159
162 // ActiveSourceDiameter (300a,0218) vr=DS, vm=1, type=3
163 bool getActiveSourceDiameter(unsigned long idx, std::string& parameter) const;
164 bool getActiveSourceDiameter(DCMTree::TreePtr item, std::string& parameter) const;
165 std::string getActiveSourceDiameterTag() const { return "(300a,0218)"; }
166 bool setActiveSourceDiameter(unsigned long idx, std::string parameter);
167
168 // ActiveSourceLength (300a,021a) vr=DS, vm=1, type=3
169 bool getActiveSourceLength(unsigned long idx, std::string& parameter) const;
170 bool getActiveSourceLength(DCMTree::TreePtr item, std::string& parameter) const;
171 std::string getActiveSourceLengthTag() const { return "(300a,021a)"; }
172 bool setActiveSourceLength(unsigned long idx, std::string parameter);
173
174 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
175 bool getMaterialID(unsigned long idx, std::string& parameter) const;
176 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
177 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
178 bool setMaterialID(unsigned long idx, std::string parameter);
179
180 // ReferenceAirKermaRate (300a,022a) vr=DS, vm=1, type=1
181 bool getReferenceAirKermaRate(unsigned long idx, std::string& parameter) const;
182 bool getReferenceAirKermaRate(DCMTree::TreePtr item, std::string& parameter) const;
183 std::string getReferenceAirKermaRateTag() const { return "(300a,022a)"; }
184 bool setReferenceAirKermaRate(unsigned long idx, std::string parameter);
185
186 // SourceEncapsulationNominalThickness (300a,0222) vr=DS, vm=1, type=3
187 bool getSourceEncapsulationNominalThickness(unsigned long idx, std::string& parameter) const;
189 std::string getSourceEncapsulationNominalThicknessTag() const { return "(300a,0222)"; }
190 bool setSourceEncapsulationNominalThickness(unsigned long idx, std::string parameter);
191
192 // SourceEncapsulationNominalTransmission (300a,0224) vr=DS, vm=1, type=3
193 bool getSourceEncapsulationNominalTransmission(unsigned long idx, std::string& parameter) const;
195 std::string getSourceEncapsulationNominalTransmissionTag() const { return "(300a,0224)"; }
196 bool setSourceEncapsulationNominalTransmission(unsigned long idx, std::string parameter);
197
198 // SourceIsotopeHalfLife (300a,0228) vr=DS, vm=1, type=1
199 bool getSourceIsotopeHalfLife(unsigned long idx, std::string& parameter) const;
200 bool getSourceIsotopeHalfLife(DCMTree::TreePtr item, std::string& parameter) const;
201 std::string getSourceIsotopeHalfLifeTag() const { return "(300a,0228)"; }
202 bool setSourceIsotopeHalfLife(unsigned long idx, std::string parameter);
203
204 // SourceIsotopeName (300a,0226) vr=LO, vm=1, type=1
205 bool getSourceIsotopeName(unsigned long idx, std::string& parameter) const;
206 bool getSourceIsotopeName(DCMTree::TreePtr item, std::string& parameter) const;
207 std::string getSourceIsotopeNameTag() const { return "(300a,0226)"; }
208 bool setSourceIsotopeName(unsigned long idx, std::string parameter);
209
210 // SourceManufacturer (300a,0216) vr=LO, vm=1, type=3
211 bool getSourceManufacturer(unsigned long idx, std::string& parameter) const;
212 bool getSourceManufacturer(DCMTree::TreePtr item, std::string& parameter) const;
213 std::string getSourceManufacturerTag() const { return "(300a,0216)"; }
214 bool setSourceManufacturer(unsigned long idx, std::string parameter);
215
216 // SourceNumber (300a,0212) vr=IS, vm=1, type=1
217 bool getSourceNumber(unsigned long idx, std::string& parameter) const;
218 bool getSourceNumber(DCMTree::TreePtr item, std::string& parameter) const;
219 std::string getSourceNumberTag() const { return "(300a,0212)"; }
220 bool setSourceNumber(unsigned long idx, std::string parameter);
221
222 // SourceStrength (300a,022b) vr=DS, vm=1, type=1C
223 bool getSourceStrength(unsigned long idx, std::string& parameter) const;
224 bool getSourceStrength(DCMTree::TreePtr item, std::string& parameter) const;
225 std::string getSourceStrengthTag() const { return "(300a,022b)"; }
226 bool setSourceStrength(unsigned long idx, std::string parameter);
227
228 // SourceStrengthReferenceDate (300a,022c) vr=DA, vm=1, type=1
229 bool getSourceStrengthReferenceDate(unsigned long idx, std::string& parameter) const;
230 bool getSourceStrengthReferenceDate(DCMTree::TreePtr item, std::string& parameter) const;
231 std::string getSourceStrengthReferenceDateTag() const { return "(300a,022c)"; }
232 bool setSourceStrengthReferenceDate(unsigned long idx, std::string parameter);
233
234 // SourceStrengthReferenceTime (300a,022e) vr=TM, vm=1, type=1
235 bool getSourceStrengthReferenceTime(unsigned long idx, std::string& parameter) const;
236 bool getSourceStrengthReferenceTime(DCMTree::TreePtr item, std::string& parameter) const;
237 std::string getSourceStrengthReferenceTimeTag() const { return "(300a,022e)"; }
238 bool setSourceStrengthReferenceTime(unsigned long idx, std::string parameter);
239
240 // SourceStrengthUnits (300a,0229) vr=CS, vm=1, type=1C
241 bool getSourceStrengthUnits(unsigned long idx, std::string& parameter) const;
242 bool getSourceStrengthUnits(DCMTree::TreePtr item, std::string& parameter) const;
243 std::string getSourceStrengthUnitsTag() const { return "(300a,0229)"; }
244 bool setSourceStrengthUnits(unsigned long idx, std::string parameter);
245
246 // SourceType (300a,0214) vr=CS, vm=1, type=1
247 bool getSourceType(unsigned long idx, std::string& parameter) const;
248 bool getSourceType(DCMTree::TreePtr item, std::string& parameter) const;
249 std::string getSourceTypeTag() const { return "(300a,0214)"; }
250 bool setSourceType(unsigned long idx, std::string parameter);
251
252
255 void setSequence(std::vector<DcmDRTSourceSequenceInterface::Item> dcmSequence) {
256 _itemVec = dcmSequence;
257 }
258
261 std::vector<DcmDRTSourceSequenceInterface::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(DcmDRTSourceSequenceInterface::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<DcmDRTSourceSequenceInterface::Item>::iterator it = _itemVec.begin();
302 std::advance(it, idx);
303 _itemVec.insert(it, DcmDRTSourceSequenceInterface::Item());
304 return true;
305 }
306 return false;
307 }
308
311 bool removeItem(const size_t idx) {
312 if ( _itemVec.size() > idx ) {
313 std::vector<DcmDRTSourceSequenceInterface::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<DcmDRTSourceSequenceInterface::Item> _itemVec;
324};
325
327
328#endif // __mlDcmDRTSourceSequenceInterface_H
329
330/* MeVis-Hidden-Components-Start */
331/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setSourceStrengthReferenceDate(std::string parameter)
bool setActiveSourceLength(std::string parameter)
bool getSourceStrengthReferenceDate(std::string &parameter) const
bool getSourceManufacturer(std::string &parameter) const
bool getSourceIsotopeHalfLife(std::string &parameter) const
bool setSourceStrength(std::string parameter)
bool setSourceManufacturer(std::string parameter)
bool setSourceType(std::string parameter)
bool getMaterialID(std::string &parameter) const
bool getSourceIsotopeName(std::string &parameter) const
bool setReferenceAirKermaRate(std::string parameter)
bool getSourceNumber(std::string &parameter) const
bool setMaterialID(std::string parameter)
bool getSourceStrengthUnits(std::string &parameter) const
bool getActiveSourceDiameter(std::string &parameter) const
bool getSourceEncapsulationNominalTransmission(std::string &parameter) const
bool getSourceStrength(std::string &parameter) const
bool setSourceIsotopeHalfLife(std::string parameter)
bool setSourceStrengthUnits(std::string parameter)
bool setSourceStrengthReferenceTime(std::string parameter)
bool setActiveSourceDiameter(std::string parameter)
bool setSourceIsotopeName(std::string parameter)
bool setSourceNumber(std::string parameter)
bool getReferenceAirKermaRate(std::string &parameter) const
bool getSourceStrengthReferenceTime(std::string &parameter) const
bool setSourceEncapsulationNominalTransmission(std::string parameter)
bool getSourceType(std::string &parameter) const
bool getSourceEncapsulationNominalThickness(std::string &parameter) const
bool setSourceEncapsulationNominalThickness(std::string parameter)
bool getActiveSourceLength(std::string &parameter) const
Class to provide access to DRTSourceSequence.
bool getReferenceAirKermaRate(unsigned long idx, std::string &parameter) const
bool getActiveSourceDiameter(unsigned long idx, std::string &parameter) const
bool setSourceEncapsulationNominalTransmission(unsigned long idx, std::string parameter)
bool setActiveSourceLength(unsigned long idx, std::string parameter)
bool setSourceIsotopeName(unsigned long idx, std::string parameter)
bool setSourceIsotopeHalfLife(unsigned long idx, std::string parameter)
bool getSourceStrength(unsigned long idx, std::string &parameter) const
bool getSourceIsotopeHalfLife(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getReferenceAirKermaRate(DCMTree::TreePtr item, std::string &parameter) const
bool setActiveSourceDiameter(unsigned long idx, std::string parameter)
bool setSourceStrengthReferenceDate(unsigned long idx, std::string parameter)
std::vector< DcmDRTSourceSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceStrengthReferenceDate(DCMTree::TreePtr item, std::string &parameter) const
bool setSourceNumber(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTSourceSequenceInterface::Item > dcmSequence)
Set the DRTSourceSequence this interface class provides access to.
bool setReferenceAirKermaRate(unsigned long idx, std::string parameter)
bool getSourceStrengthUnits(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceEncapsulationNominalTransmission(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceIsotopeHalfLife(unsigned long idx, std::string &parameter) const
bool getSourceStrengthUnits(unsigned long idx, std::string &parameter) const
bool getSourceNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceIsotopeName(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceNumber(unsigned long idx, std::string &parameter) const
DcmDRTSourceSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool setSourceStrength(unsigned long idx, std::string parameter)
bool getMaterialID(unsigned long idx, std::string &parameter) const
bool getSourceStrength(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceEncapsulationNominalThickness(unsigned long idx, std::string &parameter) const
bool getSourceType(DCMTree::TreePtr item, std::string &parameter) const
bool getActiveSourceLength(unsigned long idx, std::string &parameter) const
bool getSourceStrengthReferenceTime(unsigned long idx, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setSourceEncapsulationNominalThickness(unsigned long idx, std::string parameter)
bool setSourceType(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTSourceSequence is set.
bool getSourceEncapsulationNominalTransmission(unsigned long idx, std::string &parameter) const
bool getSourceManufacturer(DCMTree::TreePtr item, std::string &parameter) const
bool setSourceManufacturer(unsigned long idx, std::string parameter)
std::vector< DcmDRTSourceSequenceInterface::Item > getSequence() const
Return the DRTSourceSequence this interface class provides access to.
bool getSourceType(unsigned long idx, std::string &parameter) const
bool getSourceManufacturer(unsigned long idx, std::string &parameter) const
DcmDRTSourceSequenceInterface(std::vector< DcmDRTSourceSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getActiveSourceLength(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTSourceSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getSourceEncapsulationNominalThickness(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceIsotopeName(unsigned long idx, std::string &parameter) const
DcmDRTSourceSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getSourceStrengthReferenceDate(unsigned long idx, std::string &parameter) const
bool getSourceStrengthReferenceTime(DCMTree::TreePtr item, std::string &parameter) const
bool setMaterialID(unsigned long idx, std::string parameter)
void addItem(DcmDRTSourceSequenceInterface::Item newItem)
bool setSourceStrengthReferenceTime(unsigned long idx, std::string parameter)
bool setSourceStrengthUnits(unsigned long idx, std::string parameter)
bool getActiveSourceDiameter(DCMTree::TreePtr item, std::string &parameter) const
virtual ~DcmDRTSourceSequenceInterface()
Default virtual Destructor.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
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