MeVisLab Toolbox Reference
mlDcmDRTMeasuredDoseReferenceSequenceInterface.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 __mlDcmDRTMeasuredDoseReferenceSequenceInterface_H
24#define __mlDcmDRTMeasuredDoseReferenceSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTMeasuredDoseReferenceSequenceInterface.h" //DRTMeasuredDoseReferenceSequence
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 // DoseUnits (3004,0002) vr=CS, vm=1, type=1
67 bool getDoseUnits(std::string& parameter) const;
68 std::string getDoseUnitsTag() const { return "(3004,0002)"; }
69 bool setDoseUnits(std::string parameter);
70
71 // MeasuredDoseDescription (3008,0012) vr=ST, vm=1, type=3
72 bool getMeasuredDoseDescription(std::string& parameter) const;
73 std::string getMeasuredDoseDescriptionTag() const { return "(3008,0012)"; }
74 bool setMeasuredDoseDescription(std::string parameter);
75
76 // MeasuredDoseReferenceNumber (3008,0064) vr=IS, vm=1, type=1C
77 bool getMeasuredDoseReferenceNumber(std::string& parameter) const;
78 std::string getMeasuredDoseReferenceNumberTag() const { return "(3008,0064)"; }
79 bool setMeasuredDoseReferenceNumber(std::string parameter);
80
81 // MeasuredDoseType (3008,0014) vr=CS, vm=1, type=2
82 bool getMeasuredDoseType(std::string& parameter) const;
83 std::string getMeasuredDoseTypeTag() const { return "(3008,0014)"; }
84 bool setMeasuredDoseType(std::string parameter);
85
86 // MeasuredDoseValue (3008,0016) vr=DS, vm=1, type=2
87 bool getMeasuredDoseValue(std::string& parameter) const;
88 std::string getMeasuredDoseValueTag() const { return "(3008,0016)"; }
89 bool setMeasuredDoseValue(std::string parameter);
90
91 // ReferencedDoseReferenceNumber (300c,0051) vr=IS, vm=1, type=1C
92 bool getReferencedDoseReferenceNumber(std::string& parameter) const;
93 std::string getReferencedDoseReferenceNumberTag() const { return "(300c,0051)"; }
94 bool setReferencedDoseReferenceNumber(std::string parameter);
95
96
97 private:
98
99 DCMTree::TreePtr _dcmItem;
100
101 };
102
104
106 DcmDRTMeasuredDoseReferenceSequenceInterface(std::vector<DcmDRTMeasuredDoseReferenceSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
107
114
117 // DoseUnits (3004,0002) vr=CS, vm=1, type=1
118 bool getDoseUnits(unsigned long idx, std::string& parameter) const;
119 bool getDoseUnits(DCMTree::TreePtr item, std::string& parameter) const;
120 std::string getDoseUnitsTag() const { return "(3004,0002)"; }
121 bool setDoseUnits(unsigned long idx, std::string parameter);
122
123 // MeasuredDoseDescription (3008,0012) vr=ST, vm=1, type=3
124 bool getMeasuredDoseDescription(unsigned long idx, std::string& parameter) const;
125 bool getMeasuredDoseDescription(DCMTree::TreePtr item, std::string& parameter) const;
126 std::string getMeasuredDoseDescriptionTag() const { return "(3008,0012)"; }
127 bool setMeasuredDoseDescription(unsigned long idx, std::string parameter);
128
129 // MeasuredDoseReferenceNumber (3008,0064) vr=IS, vm=1, type=1C
130 bool getMeasuredDoseReferenceNumber(unsigned long idx, std::string& parameter) const;
131 bool getMeasuredDoseReferenceNumber(DCMTree::TreePtr item, std::string& parameter) const;
132 std::string getMeasuredDoseReferenceNumberTag() const { return "(3008,0064)"; }
133 bool setMeasuredDoseReferenceNumber(unsigned long idx, std::string parameter);
134
135 // MeasuredDoseType (3008,0014) vr=CS, vm=1, type=2
136 bool getMeasuredDoseType(unsigned long idx, std::string& parameter) const;
137 bool getMeasuredDoseType(DCMTree::TreePtr item, std::string& parameter) const;
138 std::string getMeasuredDoseTypeTag() const { return "(3008,0014)"; }
139 bool setMeasuredDoseType(unsigned long idx, std::string parameter);
140
141 // MeasuredDoseValue (3008,0016) vr=DS, vm=1, type=2
142 bool getMeasuredDoseValue(unsigned long idx, std::string& parameter) const;
143 bool getMeasuredDoseValue(DCMTree::TreePtr item, std::string& parameter) const;
144 std::string getMeasuredDoseValueTag() const { return "(3008,0016)"; }
145 bool setMeasuredDoseValue(unsigned long idx, std::string parameter);
146
147 // ReferencedDoseReferenceNumber (300c,0051) vr=IS, vm=1, type=1C
148 bool getReferencedDoseReferenceNumber(unsigned long idx, std::string& parameter) const;
149 bool getReferencedDoseReferenceNumber(DCMTree::TreePtr item, std::string& parameter) const;
150 std::string getReferencedDoseReferenceNumberTag() const { return "(300c,0051)"; }
151 bool setReferencedDoseReferenceNumber(unsigned long idx, std::string parameter);
152
153
156 void setSequence(std::vector<DcmDRTMeasuredDoseReferenceSequenceInterface::Item> dcmSequence) {
157 _itemVec = dcmSequence;
158 }
159
162 std::vector<DcmDRTMeasuredDoseReferenceSequenceInterface::Item> getSequence() const {
163 return _itemVec;
164 }
165
168 bool hasSequence() const {
169 return (_itemVec.size() != 0);
170 }
171
175 return static_cast<MLint>(_itemVec.size());
176 }
177
181 if (_itemVec.size() > idx) {
182 return _itemVec[idx];
183 }
185 }
186
191 return _itemVec[_itemVec.size()-1];
192 }
193
197
200 bool insertItem(const size_t idx) {
201 if (_itemVec.size() > idx) {
202 std::vector<DcmDRTMeasuredDoseReferenceSequenceInterface::Item>::iterator it = _itemVec.begin();
203 std::advance(it, idx);
205 return true;
206 }
207 return false;
208 }
209
212 bool removeItem(const size_t idx) {
213 if ( _itemVec.size() > idx ) {
214 std::vector<DcmDRTMeasuredDoseReferenceSequenceInterface::Item>::iterator it = _itemVec.begin();
215 std::advance(it, idx);
216 _itemVec.erase(it);
217 return true;
218 }
219 return false;
220 }
221
222 protected:
224 std::vector<DcmDRTMeasuredDoseReferenceSequenceInterface::Item> _itemVec;
225};
226
228
229#endif // __mlDcmDRTMeasuredDoseReferenceSequenceInterface_H
230
231/* MeVis-Hidden-Components-Start */
232/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getMeasuredDoseType(std::string &parameter) const
bool setReferencedDoseReferenceNumber(std::string parameter)
bool getMeasuredDoseDescription(std::string &parameter) const
bool getReferencedDoseReferenceNumber(std::string &parameter) const
bool getMeasuredDoseReferenceNumber(std::string &parameter) const
bool getMeasuredDoseValue(std::string &parameter) const
bool setMeasuredDoseReferenceNumber(std::string parameter)
bool getDoseUnits(std::string &parameter) const
Class to provide access to DRTMeasuredDoseReferenceSequence.
bool setMeasuredDoseDescription(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getMeasuredDoseType(unsigned long idx, std::string &parameter) const
bool getMeasuredDoseDescription(unsigned long idx, std::string &parameter) const
bool getDoseUnits(unsigned long idx, std::string &parameter) const
DcmDRTMeasuredDoseReferenceSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
void addItem(DcmDRTMeasuredDoseReferenceSequenceInterface::Item newItem)
bool getReferencedDoseReferenceNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setMeasuredDoseReferenceNumber(unsigned long idx, std::string parameter)
DcmDRTMeasuredDoseReferenceSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool setReferencedDoseReferenceNumber(unsigned long idx, std::string parameter)
DcmDRTMeasuredDoseReferenceSequenceInterface(std::vector< DcmDRTMeasuredDoseReferenceSequenceInterface::Item > dcmSequence)
Default Constructor.
bool hasSequence() const
Check if the DRTMeasuredDoseReferenceSequence is set.
bool getDoseUnits(DCMTree::TreePtr item, std::string &parameter) const
bool getMeasuredDoseReferenceNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getMeasuredDoseType(DCMTree::TreePtr item, std::string &parameter) const
void setSequence(std::vector< DcmDRTMeasuredDoseReferenceSequenceInterface::Item > dcmSequence)
Set the DRTMeasuredDoseReferenceSequence this interface class provides access to.
bool getMeasuredDoseDescription(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTMeasuredDoseReferenceSequenceInterface::Item > getSequence() const
Return the DRTMeasuredDoseReferenceSequence this interface class provides access to.
bool getReferencedDoseReferenceNumber(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTMeasuredDoseReferenceSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setMeasuredDoseType(unsigned long idx, std::string parameter)
bool setDoseUnits(unsigned long idx, std::string parameter)
bool setMeasuredDoseValue(unsigned long idx, std::string parameter)
bool getMeasuredDoseValue(DCMTree::TreePtr item, std::string &parameter) const
bool getMeasuredDoseReferenceNumber(unsigned long idx, std::string &parameter) const
bool getMeasuredDoseValue(unsigned long idx, 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