MeVisLab Toolbox Reference
mlDcmDRTRangeModulatorSequenceInterface.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 __mlDcmDRTRangeModulatorSequenceInterface_H
24#define __mlDcmDRTRangeModulatorSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTRangeModulatorSequenceInterface.h" //DRTRangeModulatorSequence
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 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
67 bool getAccessoryCode(std::string& parameter) const;
68 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
69 bool setAccessoryCode(std::string parameter);
70
71 // BeamCurrentModulationID (300a,034c) vr=SH, vm=1, type=1C
72 bool getBeamCurrentModulationID(std::string& parameter) const;
73 std::string getBeamCurrentModulationIDTag() const { return "(300a,034c)"; }
74 bool setBeamCurrentModulationID(std::string parameter);
75
76 // RangeModulatorDescription (300a,034a) vr=LO, vm=1, type=3
77 bool getRangeModulatorDescription(std::string& parameter) const;
78 std::string getRangeModulatorDescriptionTag() const { return "(300a,034a)"; }
79 bool setRangeModulatorDescription(std::string parameter);
80
81 // RangeModulatorID (300a,0346) vr=SH, vm=1, type=1
82 bool getRangeModulatorID(std::string& parameter) const;
83 std::string getRangeModulatorIDTag() const { return "(300a,0346)"; }
84 bool setRangeModulatorID(std::string parameter);
85
86 // RangeModulatorNumber (300a,0344) vr=IS, vm=1, type=1
87 bool getRangeModulatorNumber(std::string& parameter) const;
88 std::string getRangeModulatorNumberTag() const { return "(300a,0344)"; }
89 bool setRangeModulatorNumber(std::string parameter);
90
91 // RangeModulatorType (300a,0348) vr=CS, vm=1, type=1
92 bool getRangeModulatorType(std::string& parameter) const;
93 std::string getRangeModulatorTypeTag() const { return "(300a,0348)"; }
94 bool setRangeModulatorType(std::string parameter);
95
96
97 private:
98
99 DCMTree::TreePtr _dcmItem;
100
101 };
102
104
106 DcmDRTRangeModulatorSequenceInterface(std::vector<DcmDRTRangeModulatorSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
107
114
117 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
118 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
119 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
120 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
121 bool setAccessoryCode(unsigned long idx, std::string parameter);
122
123 // BeamCurrentModulationID (300a,034c) vr=SH, vm=1, type=1C
124 bool getBeamCurrentModulationID(unsigned long idx, std::string& parameter) const;
125 bool getBeamCurrentModulationID(DCMTree::TreePtr item, std::string& parameter) const;
126 std::string getBeamCurrentModulationIDTag() const { return "(300a,034c)"; }
127 bool setBeamCurrentModulationID(unsigned long idx, std::string parameter);
128
129 // RangeModulatorDescription (300a,034a) vr=LO, vm=1, type=3
130 bool getRangeModulatorDescription(unsigned long idx, std::string& parameter) const;
131 bool getRangeModulatorDescription(DCMTree::TreePtr item, std::string& parameter) const;
132 std::string getRangeModulatorDescriptionTag() const { return "(300a,034a)"; }
133 bool setRangeModulatorDescription(unsigned long idx, std::string parameter);
134
135 // RangeModulatorID (300a,0346) vr=SH, vm=1, type=1
136 bool getRangeModulatorID(unsigned long idx, std::string& parameter) const;
137 bool getRangeModulatorID(DCMTree::TreePtr item, std::string& parameter) const;
138 std::string getRangeModulatorIDTag() const { return "(300a,0346)"; }
139 bool setRangeModulatorID(unsigned long idx, std::string parameter);
140
141 // RangeModulatorNumber (300a,0344) vr=IS, vm=1, type=1
142 bool getRangeModulatorNumber(unsigned long idx, std::string& parameter) const;
143 bool getRangeModulatorNumber(DCMTree::TreePtr item, std::string& parameter) const;
144 std::string getRangeModulatorNumberTag() const { return "(300a,0344)"; }
145 bool setRangeModulatorNumber(unsigned long idx, std::string parameter);
146
147 // RangeModulatorType (300a,0348) vr=CS, vm=1, type=1
148 bool getRangeModulatorType(unsigned long idx, std::string& parameter) const;
149 bool getRangeModulatorType(DCMTree::TreePtr item, std::string& parameter) const;
150 std::string getRangeModulatorTypeTag() const { return "(300a,0348)"; }
151 bool setRangeModulatorType(unsigned long idx, std::string parameter);
152
153
156 void setSequence(std::vector<DcmDRTRangeModulatorSequenceInterface::Item> dcmSequence) {
157 _itemVec = dcmSequence;
158 }
159
162 std::vector<DcmDRTRangeModulatorSequenceInterface::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<DcmDRTRangeModulatorSequenceInterface::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<DcmDRTRangeModulatorSequenceInterface::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<DcmDRTRangeModulatorSequenceInterface::Item> _itemVec;
225};
226
228
229#endif // __mlDcmDRTRangeModulatorSequenceInterface_H
230
231/* MeVis-Hidden-Components-Start */
232/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getRangeModulatorDescription(std::string &parameter) const
bool setBeamCurrentModulationID(std::string parameter)
bool setRangeModulatorID(std::string parameter)
bool setRangeModulatorType(std::string parameter)
bool setRangeModulatorNumber(std::string parameter)
bool getAccessoryCode(std::string &parameter) const
bool getBeamCurrentModulationID(std::string &parameter) const
bool setRangeModulatorDescription(std::string parameter)
bool getRangeModulatorType(std::string &parameter) const
bool getRangeModulatorNumber(std::string &parameter) const
bool setAccessoryCode(std::string parameter)
bool getRangeModulatorID(std::string &parameter) const
Class to provide access to DRTRangeModulatorSequence.
bool hasSequence() const
Check if the DRTRangeModulatorSequence is set.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
void addItem(DcmDRTRangeModulatorSequenceInterface::Item newItem)
bool getBeamCurrentModulationID(unsigned long idx, std::string &parameter) const
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTRangeModulatorSequenceInterface::Item > getSequence() const
Return the DRTRangeModulatorSequence this interface class provides access to.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getRangeModulatorType(unsigned long idx, std::string &parameter) const
DcmDRTRangeModulatorSequenceInterface(std::vector< DcmDRTRangeModulatorSequenceInterface::Item > dcmSequence)
Default Constructor.
bool setRangeModulatorDescription(unsigned long idx, std::string parameter)
bool getBeamCurrentModulationID(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTRangeModulatorSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
std::vector< DcmDRTRangeModulatorSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
virtual ~DcmDRTRangeModulatorSequenceInterface()
Default virtual Destructor.
bool getRangeModulatorNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getRangeModulatorNumber(unsigned long idx, std::string &parameter) const
bool setBeamCurrentModulationID(unsigned long idx, std::string parameter)
DcmDRTRangeModulatorSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getRangeModulatorID(DCMTree::TreePtr item, std::string &parameter) const
bool setRangeModulatorID(unsigned long idx, std::string parameter)
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
bool getRangeModulatorID(unsigned long idx, std::string &parameter) const
bool setRangeModulatorType(unsigned long idx, std::string parameter)
bool getRangeModulatorType(DCMTree::TreePtr item, std::string &parameter) const
bool getRangeModulatorDescription(unsigned long idx, std::string &parameter) const
bool setAccessoryCode(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTRangeModulatorSequenceInterface::Item > dcmSequence)
Set the DRTRangeModulatorSequence this interface class provides access to.
bool getRangeModulatorDescription(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool setRangeModulatorNumber(unsigned long idx, std::string parameter)
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