MeVisLab Toolbox Reference
mlDcmDRTBrachyAccessoryDeviceSequenceInterface.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 __mlDcmDRTBrachyAccessoryDeviceSequenceInterface_H
24#define __mlDcmDRTBrachyAccessoryDeviceSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTBrachyAccessoryDeviceSequenceInterface.h" //DRTBrachyAccessoryDeviceSequence
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 // BrachyAccessoryDeviceID (300a,0263) vr=SH, vm=1, type=2C
67 bool getBrachyAccessoryDeviceID(std::string& parameter) const;
68 std::string getBrachyAccessoryDeviceIDTag() const { return "(300a,0263)"; }
69 bool setBrachyAccessoryDeviceID(std::string parameter);
70
71 // BrachyAccessoryDeviceName (300a,0266) vr=LO, vm=1, type=3
72 bool getBrachyAccessoryDeviceName(std::string& parameter) const;
73 std::string getBrachyAccessoryDeviceNameTag() const { return "(300a,0266)"; }
74 bool setBrachyAccessoryDeviceName(std::string parameter);
75
76 // BrachyAccessoryDeviceNominalThickness (300a,026a) vr=DS, vm=1, type=3
77 bool getBrachyAccessoryDeviceNominalThickness(std::string& parameter) const;
78 std::string getBrachyAccessoryDeviceNominalThicknessTag() const { return "(300a,026a)"; }
79 bool setBrachyAccessoryDeviceNominalThickness(std::string parameter);
80
81 // BrachyAccessoryDeviceNominalTransmission (300a,026c) vr=DS, vm=1, type=3
82 bool getBrachyAccessoryDeviceNominalTransmission(std::string& parameter) const;
83 std::string getBrachyAccessoryDeviceNominalTransmissionTag() const { return "(300a,026c)"; }
85
86 // BrachyAccessoryDeviceNumber (300a,0262) vr=IS, vm=1, type=2C
87 bool getBrachyAccessoryDeviceNumber(std::string& parameter) const;
88 std::string getBrachyAccessoryDeviceNumberTag() const { return "(300a,0262)"; }
89 bool setBrachyAccessoryDeviceNumber(std::string parameter);
90
91 // BrachyAccessoryDeviceType (300a,0264) vr=CS, vm=1, type=1C
92 bool getBrachyAccessoryDeviceType(std::string& parameter) const;
93 std::string getBrachyAccessoryDeviceTypeTag() const { return "(300a,0264)"; }
94 bool setBrachyAccessoryDeviceType(std::string parameter);
95
96 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
97 bool getMaterialID(std::string& parameter) const;
98 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
99 bool setMaterialID(std::string parameter);
100
101 // ReferencedROINumber (3006,0084) vr=IS, vm=1, type=2C
102 bool getReferencedROINumber(std::string& parameter) const;
103 std::string getReferencedROINumberTag() const { return "(3006,0084)"; }
104 bool setReferencedROINumber(std::string parameter);
105
106
107 private:
108
109 DCMTree::TreePtr _dcmItem;
110
111 };
112
114
116 DcmDRTBrachyAccessoryDeviceSequenceInterface(std::vector<DcmDRTBrachyAccessoryDeviceSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
117
124
127 // BrachyAccessoryDeviceID (300a,0263) vr=SH, vm=1, type=2C
128 bool getBrachyAccessoryDeviceID(unsigned long idx, std::string& parameter) const;
129 bool getBrachyAccessoryDeviceID(DCMTree::TreePtr item, std::string& parameter) const;
130 std::string getBrachyAccessoryDeviceIDTag() const { return "(300a,0263)"; }
131 bool setBrachyAccessoryDeviceID(unsigned long idx, std::string parameter);
132
133 // BrachyAccessoryDeviceName (300a,0266) vr=LO, vm=1, type=3
134 bool getBrachyAccessoryDeviceName(unsigned long idx, std::string& parameter) const;
135 bool getBrachyAccessoryDeviceName(DCMTree::TreePtr item, std::string& parameter) const;
136 std::string getBrachyAccessoryDeviceNameTag() const { return "(300a,0266)"; }
137 bool setBrachyAccessoryDeviceName(unsigned long idx, std::string parameter);
138
139 // BrachyAccessoryDeviceNominalThickness (300a,026a) vr=DS, vm=1, type=3
140 bool getBrachyAccessoryDeviceNominalThickness(unsigned long idx, std::string& parameter) const;
142 std::string getBrachyAccessoryDeviceNominalThicknessTag() const { return "(300a,026a)"; }
143 bool setBrachyAccessoryDeviceNominalThickness(unsigned long idx, std::string parameter);
144
145 // BrachyAccessoryDeviceNominalTransmission (300a,026c) vr=DS, vm=1, type=3
146 bool getBrachyAccessoryDeviceNominalTransmission(unsigned long idx, std::string& parameter) const;
148 std::string getBrachyAccessoryDeviceNominalTransmissionTag() const { return "(300a,026c)"; }
149 bool setBrachyAccessoryDeviceNominalTransmission(unsigned long idx, std::string parameter);
150
151 // BrachyAccessoryDeviceNumber (300a,0262) vr=IS, vm=1, type=2C
152 bool getBrachyAccessoryDeviceNumber(unsigned long idx, std::string& parameter) const;
153 bool getBrachyAccessoryDeviceNumber(DCMTree::TreePtr item, std::string& parameter) const;
154 std::string getBrachyAccessoryDeviceNumberTag() const { return "(300a,0262)"; }
155 bool setBrachyAccessoryDeviceNumber(unsigned long idx, std::string parameter);
156
157 // BrachyAccessoryDeviceType (300a,0264) vr=CS, vm=1, type=1C
158 bool getBrachyAccessoryDeviceType(unsigned long idx, std::string& parameter) const;
159 bool getBrachyAccessoryDeviceType(DCMTree::TreePtr item, std::string& parameter) const;
160 std::string getBrachyAccessoryDeviceTypeTag() const { return "(300a,0264)"; }
161 bool setBrachyAccessoryDeviceType(unsigned long idx, std::string parameter);
162
163 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
164 bool getMaterialID(unsigned long idx, std::string& parameter) const;
165 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
166 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
167 bool setMaterialID(unsigned long idx, std::string parameter);
168
169 // ReferencedROINumber (3006,0084) vr=IS, vm=1, type=2C
170 bool getReferencedROINumber(unsigned long idx, std::string& parameter) const;
171 bool getReferencedROINumber(DCMTree::TreePtr item, std::string& parameter) const;
172 std::string getReferencedROINumberTag() const { return "(3006,0084)"; }
173 bool setReferencedROINumber(unsigned long idx, std::string parameter);
174
175
178 void setSequence(std::vector<DcmDRTBrachyAccessoryDeviceSequenceInterface::Item> dcmSequence) {
179 _itemVec = dcmSequence;
180 }
181
184 std::vector<DcmDRTBrachyAccessoryDeviceSequenceInterface::Item> getSequence() const {
185 return _itemVec;
186 }
187
190 bool hasSequence() const {
191 return (_itemVec.size() != 0);
192 }
193
197 return static_cast<MLint>(_itemVec.size());
198 }
199
203 if (_itemVec.size() > idx) {
204 return _itemVec[idx];
205 }
207 }
208
213 return _itemVec[_itemVec.size()-1];
214 }
215
219
222 bool insertItem(const size_t idx) {
223 if (_itemVec.size() > idx) {
224 std::vector<DcmDRTBrachyAccessoryDeviceSequenceInterface::Item>::iterator it = _itemVec.begin();
225 std::advance(it, idx);
227 return true;
228 }
229 return false;
230 }
231
234 bool removeItem(const size_t idx) {
235 if ( _itemVec.size() > idx ) {
236 std::vector<DcmDRTBrachyAccessoryDeviceSequenceInterface::Item>::iterator it = _itemVec.begin();
237 std::advance(it, idx);
238 _itemVec.erase(it);
239 return true;
240 }
241 return false;
242 }
243
244 protected:
246 std::vector<DcmDRTBrachyAccessoryDeviceSequenceInterface::Item> _itemVec;
247};
248
250
251#endif // __mlDcmDRTBrachyAccessoryDeviceSequenceInterface_H
252
253/* MeVis-Hidden-Components-Start */
254/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setBrachyAccessoryDeviceName(std::string parameter)
bool getBrachyAccessoryDeviceID(std::string &parameter) const
bool getBrachyAccessoryDeviceName(std::string &parameter) const
bool setBrachyAccessoryDeviceNominalThickness(std::string parameter)
bool getReferencedROINumber(std::string &parameter) const
bool getBrachyAccessoryDeviceNominalTransmission(std::string &parameter) const
bool setBrachyAccessoryDeviceNumber(std::string parameter)
bool setBrachyAccessoryDeviceNominalTransmission(std::string parameter)
bool getBrachyAccessoryDeviceNominalThickness(std::string &parameter) const
bool setBrachyAccessoryDeviceType(std::string parameter)
bool getBrachyAccessoryDeviceNumber(std::string &parameter) const
bool getMaterialID(std::string &parameter) const
bool getBrachyAccessoryDeviceType(std::string &parameter) const
Class to provide access to DRTBrachyAccessoryDeviceSequence.
bool getBrachyAccessoryDeviceNumber(unsigned long idx, std::string &parameter) const
bool getBrachyAccessoryDeviceNominalTransmission(unsigned long idx, std::string &parameter) const
DcmDRTBrachyAccessoryDeviceSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
DcmDRTBrachyAccessoryDeviceSequenceInterface(std::vector< DcmDRTBrachyAccessoryDeviceSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getBrachyAccessoryDeviceID(unsigned long idx, std::string &parameter) const
bool setBrachyAccessoryDeviceName(unsigned long idx, std::string parameter)
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTBrachyAccessoryDeviceSequenceInterface::Item > getSequence() const
Return the DRTBrachyAccessoryDeviceSequence this interface class provides access to.
bool getBrachyAccessoryDeviceID(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
void addItem(DcmDRTBrachyAccessoryDeviceSequenceInterface::Item newItem)
bool setBrachyAccessoryDeviceType(unsigned long idx, std::string parameter)
bool setBrachyAccessoryDeviceNumber(unsigned long idx, std::string parameter)
bool getBrachyAccessoryDeviceType(DCMTree::TreePtr item, std::string &parameter) const
bool getMaterialID(unsigned long idx, std::string &parameter) const
bool setReferencedROINumber(unsigned long idx, std::string parameter)
bool getBrachyAccessoryDeviceNominalThickness(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTBrachyAccessoryDeviceSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setBrachyAccessoryDeviceNominalTransmission(unsigned long idx, std::string parameter)
bool setBrachyAccessoryDeviceID(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool hasSequence() const
Check if the DRTBrachyAccessoryDeviceSequence is set.
bool getReferencedROINumber(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTBrachyAccessoryDeviceSequenceInterface::Item & addItem()
Adds a new item to the sequence.
void setSequence(std::vector< DcmDRTBrachyAccessoryDeviceSequenceInterface::Item > dcmSequence)
Set the DRTBrachyAccessoryDeviceSequence this interface class provides access to.
bool setBrachyAccessoryDeviceNominalThickness(unsigned long idx, std::string parameter)
bool setMaterialID(unsigned long idx, std::string parameter)
bool getBrachyAccessoryDeviceName(DCMTree::TreePtr item, std::string &parameter) const
bool getReferencedROINumber(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getBrachyAccessoryDeviceType(unsigned long idx, std::string &parameter) const
bool getBrachyAccessoryDeviceNominalTransmission(DCMTree::TreePtr item, std::string &parameter) const
bool getBrachyAccessoryDeviceName(unsigned long idx, std::string &parameter) const
bool getBrachyAccessoryDeviceNominalThickness(unsigned long idx, std::string &parameter) const
bool getBrachyAccessoryDeviceNumber(DCMTree::TreePtr item, std::string &parameter) const
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