MeVisLab Toolbox Reference
mlDcmDRTDVHSequenceInterface.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 __mlDcmDRTDVHSequenceInterface_H
24#define __mlDcmDRTDVHSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTDVHSequenceInterface.h" //DRTDVHSequence
31#include "mlDcmDRTDVHReferencedROISequenceInterface.h" //DRTDVHReferencedROISequence
32
33
34// ML includes
35#ifndef __mlModuleIncludes_H
36#include "mlModuleIncludes.h"
37#endif
38
40
41// ------------------------------------------------------------------
43// ------------------------------------------------------------------
45{
46 public:
47
49 {
50 public:
51
52 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
53
55
56 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
57
58 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
59
60 virtual ~Item() {}
61
62 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
63
64 bool isValid() const { return _dcmItem.get() != nullptr; }
65
66
67 // DVHData (3004,0058) vr=DS, vm=2-2n, type=1
68 bool getDVHData(std::string& parameter) const;
69 std::string getDVHDataTag() const { return "(3004,0058)"; }
70 bool setDVHData(std::string parameter);
71
72 // DVHDoseScaling (3004,0052) vr=DS, vm=1, type=1
73 bool getDVHDoseScaling(std::string& parameter) const;
74 std::string getDVHDoseScalingTag() const { return "(3004,0052)"; }
75 bool setDVHDoseScaling(std::string parameter);
76
77 // DVHMaximumDose (3004,0072) vr=DS, vm=1, type=3
78 bool getDVHMaximumDose(std::string& parameter) const;
79 std::string getDVHMaximumDoseTag() const { return "(3004,0072)"; }
80 bool setDVHMaximumDose(std::string parameter);
81
82 // DVHMeanDose (3004,0074) vr=DS, vm=1, type=3
83 bool getDVHMeanDose(std::string& parameter) const;
84 std::string getDVHMeanDoseTag() const { return "(3004,0074)"; }
85 bool setDVHMeanDose(std::string parameter);
86
87 // DVHMinimumDose (3004,0070) vr=DS, vm=1, type=3
88 bool getDVHMinimumDose(std::string& parameter) const;
89 std::string getDVHMinimumDoseTag() const { return "(3004,0070)"; }
90 bool setDVHMinimumDose(std::string parameter);
91
92 // DVHNumberOfBins (3004,0056) vr=IS, vm=1, type=1
93 bool getDVHNumberOfBins(std::string& parameter) const;
94 std::string getDVHNumberOfBinsTag() const { return "(3004,0056)"; }
95 bool setDVHNumberOfBins(std::string parameter);
96
97 // DVHType (3004,0001) vr=CS, vm=1, type=1
98 bool getDVHType(std::string& parameter) const;
99 std::string getDVHTypeTag() const { return "(3004,0001)"; }
100 bool setDVHType(std::string parameter);
101
102 // DVHVolumeUnits (3004,0054) vr=CS, vm=1, type=1
103 bool getDVHVolumeUnits(std::string& parameter) const;
104 std::string getDVHVolumeUnitsTag() const { return "(3004,0054)"; }
105 bool setDVHVolumeUnits(std::string parameter);
106
107 // DoseType (3004,0004) vr=CS, vm=1, type=1
108 bool getDoseType(std::string& parameter) const;
109 std::string getDoseTypeTag() const { return "(3004,0004)"; }
110 bool setDoseType(std::string parameter);
111
112 // DoseUnits (3004,0002) vr=CS, vm=1, type=1
113 bool getDoseUnits(std::string& parameter) const;
114 std::string getDoseUnitsTag() const { return "(3004,0002)"; }
115 bool setDoseUnits(std::string parameter);
116
117 // DVHReferencedROISequence (3004,0060) vr=SQ, vm=1, type=1
119 std::string getDVHReferencedROISequenceTag() const { return std::string("(3004,0060)"); }
121
122
123 private:
124
125 DCMTree::TreePtr _dcmItem;
126
127 };
128
130
132 DcmDRTDVHSequenceInterface(std::vector<DcmDRTDVHSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
133
135 for(size_t i=0; i < treePtrSeq.size(); i++)
136 {
137 _itemVec.push_back(DcmDRTDVHSequenceInterface::Item(treePtrSeq[i]));
138 }
139 }
140
143 // DVHData (3004,0058) vr=DS, vm=2-2n, type=1
144 bool getDVHData(unsigned long idx, std::string& parameter) const;
145 bool getDVHData(DCMTree::TreePtr item, std::string& parameter) const;
146 std::string getDVHDataTag() const { return "(3004,0058)"; }
147 bool setDVHData(unsigned long idx, std::string parameter);
148
149 // DVHDoseScaling (3004,0052) vr=DS, vm=1, type=1
150 bool getDVHDoseScaling(unsigned long idx, std::string& parameter) const;
151 bool getDVHDoseScaling(DCMTree::TreePtr item, std::string& parameter) const;
152 std::string getDVHDoseScalingTag() const { return "(3004,0052)"; }
153 bool setDVHDoseScaling(unsigned long idx, std::string parameter);
154
155 // DVHMaximumDose (3004,0072) vr=DS, vm=1, type=3
156 bool getDVHMaximumDose(unsigned long idx, std::string& parameter) const;
157 bool getDVHMaximumDose(DCMTree::TreePtr item, std::string& parameter) const;
158 std::string getDVHMaximumDoseTag() const { return "(3004,0072)"; }
159 bool setDVHMaximumDose(unsigned long idx, std::string parameter);
160
161 // DVHMeanDose (3004,0074) vr=DS, vm=1, type=3
162 bool getDVHMeanDose(unsigned long idx, std::string& parameter) const;
163 bool getDVHMeanDose(DCMTree::TreePtr item, std::string& parameter) const;
164 std::string getDVHMeanDoseTag() const { return "(3004,0074)"; }
165 bool setDVHMeanDose(unsigned long idx, std::string parameter);
166
167 // DVHMinimumDose (3004,0070) vr=DS, vm=1, type=3
168 bool getDVHMinimumDose(unsigned long idx, std::string& parameter) const;
169 bool getDVHMinimumDose(DCMTree::TreePtr item, std::string& parameter) const;
170 std::string getDVHMinimumDoseTag() const { return "(3004,0070)"; }
171 bool setDVHMinimumDose(unsigned long idx, std::string parameter);
172
173 // DVHNumberOfBins (3004,0056) vr=IS, vm=1, type=1
174 bool getDVHNumberOfBins(unsigned long idx, std::string& parameter) const;
175 bool getDVHNumberOfBins(DCMTree::TreePtr item, std::string& parameter) const;
176 std::string getDVHNumberOfBinsTag() const { return "(3004,0056)"; }
177 bool setDVHNumberOfBins(unsigned long idx, std::string parameter);
178
179 // DVHType (3004,0001) vr=CS, vm=1, type=1
180 bool getDVHType(unsigned long idx, std::string& parameter) const;
181 bool getDVHType(DCMTree::TreePtr item, std::string& parameter) const;
182 std::string getDVHTypeTag() const { return "(3004,0001)"; }
183 bool setDVHType(unsigned long idx, std::string parameter);
184
185 // DVHVolumeUnits (3004,0054) vr=CS, vm=1, type=1
186 bool getDVHVolumeUnits(unsigned long idx, std::string& parameter) const;
187 bool getDVHVolumeUnits(DCMTree::TreePtr item, std::string& parameter) const;
188 std::string getDVHVolumeUnitsTag() const { return "(3004,0054)"; }
189 bool setDVHVolumeUnits(unsigned long idx, std::string parameter);
190
191 // DoseType (3004,0004) vr=CS, vm=1, type=1
192 bool getDoseType(unsigned long idx, std::string& parameter) const;
193 bool getDoseType(DCMTree::TreePtr item, std::string& parameter) const;
194 std::string getDoseTypeTag() const { return "(3004,0004)"; }
195 bool setDoseType(unsigned long idx, std::string parameter);
196
197 // DoseUnits (3004,0002) vr=CS, vm=1, type=1
198 bool getDoseUnits(unsigned long idx, std::string& parameter) const;
199 bool getDoseUnits(DCMTree::TreePtr item, std::string& parameter) const;
200 std::string getDoseUnitsTag() const { return "(3004,0002)"; }
201 bool setDoseUnits(unsigned long idx, std::string parameter);
202
203 // DVHReferencedROISequence (3004,0060) vr=SQ, vm=1, type=1
205 std::string getDVHReferencedROISequenceTag() const { return std::string("(3004,0060)"); }
207
208
211 void setSequence(std::vector<DcmDRTDVHSequenceInterface::Item> dcmSequence) {
212 _itemVec = dcmSequence;
213 }
214
217 std::vector<DcmDRTDVHSequenceInterface::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
245 _itemVec.push_back(DcmDRTDVHSequenceInterface::Item());
246 return _itemVec[_itemVec.size()-1];
247 }
248
250 _itemVec.push_back(newItem);
251 }
252
255 bool insertItem(const size_t idx) {
256 if (_itemVec.size() > idx) {
257 std::vector<DcmDRTDVHSequenceInterface::Item>::iterator it = _itemVec.begin();
258 std::advance(it, idx);
259 _itemVec.insert(it, DcmDRTDVHSequenceInterface::Item());
260 return true;
261 }
262 return false;
263 }
264
267 bool removeItem(const size_t idx) {
268 if ( _itemVec.size() > idx ) {
269 std::vector<DcmDRTDVHSequenceInterface::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<DcmDRTDVHSequenceInterface::Item> _itemVec;
280};
281
283
284#endif // __mlDcmDRTDVHSequenceInterface_H
285
286/* MeVis-Hidden-Components-Start */
287/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTDVHReferencedROISequence.
bool getDVHType(std::string &parameter) const
DcmDRTDVHReferencedROISequenceInterface getDVHReferencedROISequence() const
bool getDoseType(std::string &parameter) const
bool getDoseUnits(std::string &parameter) const
bool setDVHNumberOfBins(std::string parameter)
bool setDVHMaximumDose(std::string parameter)
void setDVHReferencedROISequence(DcmDRTDVHReferencedROISequenceInterface seq)
bool setDVHMeanDose(std::string parameter)
bool setDoseType(std::string parameter)
bool setDoseUnits(std::string parameter)
bool setDVHData(std::string parameter)
bool getDVHMeanDose(std::string &parameter) const
bool setDVHVolumeUnits(std::string parameter)
bool getDVHNumberOfBins(std::string &parameter) const
bool getDVHDoseScaling(std::string &parameter) const
bool getDVHData(std::string &parameter) const
bool setDVHMinimumDose(std::string parameter)
bool setDVHType(std::string parameter)
bool getDVHVolumeUnits(std::string &parameter) const
bool getDVHMaximumDose(std::string &parameter) const
bool getDVHMinimumDose(std::string &parameter) const
bool setDVHDoseScaling(std::string parameter)
Class to provide access to DRTDVHSequence.
std::vector< DcmDRTDVHSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setDVHNumberOfBins(unsigned long idx, std::string parameter)
bool getDVHDoseScaling(unsigned long idx, std::string &parameter) const
void setDVHReferencedROISequence(DcmDRTDVHReferencedROISequenceInterface seq, unsigned long idx)
bool getDVHMaximumDose(unsigned long idx, std::string &parameter) const
bool setDVHVolumeUnits(unsigned long idx, std::string parameter)
bool setDoseType(unsigned long idx, std::string parameter)
bool getDVHVolumeUnits(DCMTree::TreePtr item, std::string &parameter) const
bool setDVHMeanDose(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setDVHType(unsigned long idx, std::string parameter)
bool setDVHMaximumDose(unsigned long idx, std::string parameter)
bool getDVHNumberOfBins(unsigned long idx, std::string &parameter) const
bool getDVHNumberOfBins(DCMTree::TreePtr item, std::string &parameter) const
bool getDVHVolumeUnits(unsigned long idx, std::string &parameter) const
bool getDVHData(DCMTree::TreePtr item, std::string &parameter) const
bool getDVHType(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTDVHReferencedROISequenceInterface getDVHReferencedROISequence(unsigned long idx) const
bool getDVHMaximumDose(DCMTree::TreePtr item, std::string &parameter) const
bool hasSequence() const
Check if the DRTDVHSequence is set.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
DcmDRTDVHSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getDVHMinimumDose(unsigned long idx, std::string &parameter) const
DcmDRTDVHSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getDVHType(unsigned long idx, std::string &parameter) const
bool setDVHDoseScaling(unsigned long idx, std::string parameter)
DcmDRTDVHSequenceInterface(std::vector< DcmDRTDVHSequenceInterface::Item > dcmSequence)
Default Constructor.
bool setDVHMinimumDose(unsigned long idx, std::string parameter)
bool getDVHData(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTDVHSequenceInterface::Item > dcmSequence)
Set the DRTDVHSequence this interface class provides access to.
bool getDVHDoseScaling(DCMTree::TreePtr item, std::string &parameter) const
bool getDoseType(DCMTree::TreePtr item, std::string &parameter) const
bool getDVHMeanDose(unsigned long idx, std::string &parameter) const
bool getDoseUnits(unsigned long idx, std::string &parameter) const
bool setDVHData(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
void addItem(DcmDRTDVHSequenceInterface::Item newItem)
bool setDoseUnits(unsigned long idx, std::string parameter)
std::vector< DcmDRTDVHSequenceInterface::Item > getSequence() const
Return the DRTDVHSequence this interface class provides access to.
virtual ~DcmDRTDVHSequenceInterface()
Default virtual Destructor.
bool getDVHMeanDose(DCMTree::TreePtr item, std::string &parameter) const
bool getDoseUnits(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTDVHSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getDVHMinimumDose(DCMTree::TreePtr item, std::string &parameter) const
bool getDoseType(unsigned long idx, std::string &parameter) const
Class to provide access to DRTDVHReferencedROISequence.
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