MeVisLab Toolbox Reference
mlDcmDRTIonWedgeSequenceInterface.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 __mlDcmDRTIonWedgeSequenceInterface_H
24#define __mlDcmDRTIonWedgeSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTIonWedgeSequenceInterface.h" //DRTIonWedgeSequence
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 // IsocenterToWedgeTrayDistance (300a,00d9) vr=FL, vm=1, type=1
72 bool getIsocenterToWedgeTrayDistance(float& parameter) const;
73 std::string getIsocenterToWedgeTrayDistanceTag() const { return "(300a,00d9)"; }
74 bool setIsocenterToWedgeTrayDistance(float parameter);
75
76 // WedgeAngle (300a,00d5) vr=IS, vm=1, type=2
77 bool getWedgeAngle(std::string& parameter) const;
78 std::string getWedgeAngleTag() const { return "(300a,00d5)"; }
79 bool setWedgeAngle(std::string parameter);
80
81 // WedgeID (300a,00d4) vr=SH, vm=1, type=3
82 bool getWedgeID(std::string& parameter) const;
83 std::string getWedgeIDTag() const { return "(300a,00d4)"; }
84 bool setWedgeID(std::string parameter);
85
86 // WedgeNumber (300a,00d2) vr=IS, vm=1, type=1
87 bool getWedgeNumber(std::string& parameter) const;
88 std::string getWedgeNumberTag() const { return "(300a,00d2)"; }
89 bool setWedgeNumber(std::string parameter);
90
91 // WedgeOrientation (300a,00d8) vr=DS, vm=1, type=2
92 bool getWedgeOrientation(std::string& parameter) const;
93 std::string getWedgeOrientationTag() const { return "(300a,00d8)"; }
94 bool setWedgeOrientation(std::string parameter);
95
96 // WedgeType (300a,00d3) vr=CS, vm=1, type=2
97 bool getWedgeType(std::string& parameter) const;
98 std::string getWedgeTypeTag() const { return "(300a,00d3)"; }
99 bool setWedgeType(std::string parameter);
100
101
102 private:
103
104 DCMTree::TreePtr _dcmItem;
105
106 };
107
109
111 DcmDRTIonWedgeSequenceInterface(std::vector<DcmDRTIonWedgeSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
112
114 for(size_t i=0; i < treePtrSeq.size(); i++)
115 {
117 }
118 }
119
122 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
123 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
124 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
125 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
126 bool setAccessoryCode(unsigned long idx, std::string parameter);
127
128 // IsocenterToWedgeTrayDistance (300a,00d9) vr=FL, vm=1, type=1
129 bool getIsocenterToWedgeTrayDistance(unsigned long idx, float& parameter) const;
131 std::string getIsocenterToWedgeTrayDistanceTag() const { return "(300a,00d9)"; }
132 bool setIsocenterToWedgeTrayDistance(unsigned long idx, float parameter);
133
134 // WedgeAngle (300a,00d5) vr=IS, vm=1, type=2
135 bool getWedgeAngle(unsigned long idx, std::string& parameter) const;
136 bool getWedgeAngle(DCMTree::TreePtr item, std::string& parameter) const;
137 std::string getWedgeAngleTag() const { return "(300a,00d5)"; }
138 bool setWedgeAngle(unsigned long idx, std::string parameter);
139
140 // WedgeID (300a,00d4) vr=SH, vm=1, type=3
141 bool getWedgeID(unsigned long idx, std::string& parameter) const;
142 bool getWedgeID(DCMTree::TreePtr item, std::string& parameter) const;
143 std::string getWedgeIDTag() const { return "(300a,00d4)"; }
144 bool setWedgeID(unsigned long idx, std::string parameter);
145
146 // WedgeNumber (300a,00d2) vr=IS, vm=1, type=1
147 bool getWedgeNumber(unsigned long idx, std::string& parameter) const;
148 bool getWedgeNumber(DCMTree::TreePtr item, std::string& parameter) const;
149 std::string getWedgeNumberTag() const { return "(300a,00d2)"; }
150 bool setWedgeNumber(unsigned long idx, std::string parameter);
151
152 // WedgeOrientation (300a,00d8) vr=DS, vm=1, type=2
153 bool getWedgeOrientation(unsigned long idx, std::string& parameter) const;
154 bool getWedgeOrientation(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getWedgeOrientationTag() const { return "(300a,00d8)"; }
156 bool setWedgeOrientation(unsigned long idx, std::string parameter);
157
158 // WedgeType (300a,00d3) vr=CS, vm=1, type=2
159 bool getWedgeType(unsigned long idx, std::string& parameter) const;
160 bool getWedgeType(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getWedgeTypeTag() const { return "(300a,00d3)"; }
162 bool setWedgeType(unsigned long idx, std::string parameter);
163
164
167 void setSequence(std::vector<DcmDRTIonWedgeSequenceInterface::Item> dcmSequence) {
168 _itemVec = dcmSequence;
169 }
170
173 std::vector<DcmDRTIonWedgeSequenceInterface::Item> getSequence() const {
174 return _itemVec;
175 }
176
179 bool hasSequence() const {
180 return (_itemVec.size() != 0);
181 }
182
186 return static_cast<MLint>(_itemVec.size());
187 }
188
192 if (_itemVec.size() > idx) {
193 return _itemVec[idx];
194 }
196 }
197
201 _itemVec.push_back(DcmDRTIonWedgeSequenceInterface::Item());
202 return _itemVec[_itemVec.size()-1];
203 }
204
206 _itemVec.push_back(newItem);
207 }
208
211 bool insertItem(const size_t idx) {
212 if (_itemVec.size() > idx) {
213 std::vector<DcmDRTIonWedgeSequenceInterface::Item>::iterator it = _itemVec.begin();
214 std::advance(it, idx);
215 _itemVec.insert(it, DcmDRTIonWedgeSequenceInterface::Item());
216 return true;
217 }
218 return false;
219 }
220
223 bool removeItem(const size_t idx) {
224 if ( _itemVec.size() > idx ) {
225 std::vector<DcmDRTIonWedgeSequenceInterface::Item>::iterator it = _itemVec.begin();
226 std::advance(it, idx);
227 _itemVec.erase(it);
228 return true;
229 }
230 return false;
231 }
232
233 protected:
235 std::vector<DcmDRTIonWedgeSequenceInterface::Item> _itemVec;
236};
237
239
240#endif // __mlDcmDRTIonWedgeSequenceInterface_H
241
242/* MeVis-Hidden-Components-Start */
243/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setWedgeNumber(std::string parameter)
bool getWedgeType(std::string &parameter) const
bool getAccessoryCode(std::string &parameter) const
bool getWedgeAngle(std::string &parameter) const
bool getWedgeID(std::string &parameter) const
bool setIsocenterToWedgeTrayDistance(float parameter)
bool getWedgeOrientation(std::string &parameter) const
bool setWedgeAngle(std::string parameter)
bool getIsocenterToWedgeTrayDistance(float &parameter) const
bool getWedgeNumber(std::string &parameter) const
bool setWedgeOrientation(std::string parameter)
bool setAccessoryCode(std::string parameter)
bool setWedgeType(std::string parameter)
bool setWedgeID(std::string parameter)
Class to provide access to DRTIonWedgeSequence.
bool setWedgeOrientation(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getWedgeID(DCMTree::TreePtr item, std::string &parameter) const
bool getIsocenterToWedgeTrayDistance(unsigned long idx, float &parameter) const
void setSequence(std::vector< DcmDRTIonWedgeSequenceInterface::Item > dcmSequence)
Set the DRTIonWedgeSequence this interface class provides access to.
bool setWedgeAngle(unsigned long idx, std::string parameter)
std::vector< DcmDRTIonWedgeSequenceInterface::Item > getSequence() const
Return the DRTIonWedgeSequence this interface class provides access to.
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTIonWedgeSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getWedgeNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getWedgeAngle(DCMTree::TreePtr item, std::string &parameter) const
bool setWedgeType(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTIonWedgeSequence is set.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
virtual ~DcmDRTIonWedgeSequenceInterface()
Default virtual Destructor.
bool getWedgeID(unsigned long idx, std::string &parameter) const
bool getWedgeAngle(unsigned long idx, std::string &parameter) const
bool setWedgeNumber(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
void addItem(DcmDRTIonWedgeSequenceInterface::Item newItem)
DcmDRTIonWedgeSequenceInterface::Item & addItem()
Adds a new item to the sequence.
DcmDRTIonWedgeSequenceInterface(std::vector< DcmDRTIonWedgeSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getIsocenterToWedgeTrayDistance(DCMTree::TreePtr item, float &parameter) const
bool setWedgeID(unsigned long idx, std::string parameter)
bool getWedgeOrientation(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTIonWedgeSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setAccessoryCode(unsigned long idx, std::string parameter)
DcmDRTIonWedgeSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getWedgeOrientation(unsigned long idx, std::string &parameter) const
bool getWedgeNumber(unsigned long idx, std::string &parameter) const
bool getWedgeType(unsigned long idx, std::string &parameter) const
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
bool getWedgeType(DCMTree::TreePtr item, std::string &parameter) const
bool setIsocenterToWedgeTrayDistance(unsigned long idx, float 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