MeVisLab Toolbox Reference
mlDcmDRTWedgeSequenceInterface.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 __mlDcmDRTWedgeSequenceInterface_H
24#define __mlDcmDRTWedgeSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTWedgeSequenceInterface.h" //DRTWedgeSequence
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 // SourceToWedgeTrayDistance (300a,00da) vr=DS, vm=1, type=3
72 bool getSourceToWedgeTrayDistance(std::string& parameter) const;
73 std::string getSourceToWedgeTrayDistanceTag() const { return "(300a,00da)"; }
74 bool setSourceToWedgeTrayDistance(std::string parameter);
75
76 // WedgeAngle (300a,00d5) vr=IS, vm=1, type=2C
77 bool getWedgeAngle(std::string& parameter) const;
78 std::string getWedgeAngleTag() const { return "(300a,00d5)"; }
79 bool setWedgeAngle(std::string parameter);
80
81 // WedgeFactor (300a,00d6) vr=DS, vm=1, type=2C
82 bool getWedgeFactor(std::string& parameter) const;
83 std::string getWedgeFactorTag() const { return "(300a,00d6)"; }
84 bool setWedgeFactor(std::string parameter);
85
86 // WedgeID (300a,00d4) vr=SH, vm=1, type=3
87 bool getWedgeID(std::string& parameter) const;
88 std::string getWedgeIDTag() const { return "(300a,00d4)"; }
89 bool setWedgeID(std::string parameter);
90
91 // WedgeNumber (300a,00d2) vr=IS, vm=1, type=1C
92 bool getWedgeNumber(std::string& parameter) const;
93 std::string getWedgeNumberTag() const { return "(300a,00d2)"; }
94 bool setWedgeNumber(std::string parameter);
95
96 // WedgeOrientation (300a,00d8) vr=DS, vm=1, type=2C
97 bool getWedgeOrientation(std::string& parameter) const;
98 std::string getWedgeOrientationTag() const { return "(300a,00d8)"; }
99 bool setWedgeOrientation(std::string parameter);
100
101 // WedgeType (300a,00d3) vr=CS, vm=1, type=2C
102 bool getWedgeType(std::string& parameter) const;
103 std::string getWedgeTypeTag() const { return "(300a,00d3)"; }
104 bool setWedgeType(std::string parameter);
105
106
107 private:
108
109 DCMTree::TreePtr _dcmItem;
110
111 };
112
114
116 DcmDRTWedgeSequenceInterface(std::vector<DcmDRTWedgeSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
117
119 for(size_t i=0; i < treePtrSeq.size(); i++)
120 {
121 _itemVec.push_back(DcmDRTWedgeSequenceInterface::Item(treePtrSeq[i]));
122 }
123 }
124
127 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
128 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
129 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
130 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
131 bool setAccessoryCode(unsigned long idx, std::string parameter);
132
133 // SourceToWedgeTrayDistance (300a,00da) vr=DS, vm=1, type=3
134 bool getSourceToWedgeTrayDistance(unsigned long idx, std::string& parameter) const;
135 bool getSourceToWedgeTrayDistance(DCMTree::TreePtr item, std::string& parameter) const;
136 std::string getSourceToWedgeTrayDistanceTag() const { return "(300a,00da)"; }
137 bool setSourceToWedgeTrayDistance(unsigned long idx, std::string parameter);
138
139 // WedgeAngle (300a,00d5) vr=IS, vm=1, type=2C
140 bool getWedgeAngle(unsigned long idx, std::string& parameter) const;
141 bool getWedgeAngle(DCMTree::TreePtr item, std::string& parameter) const;
142 std::string getWedgeAngleTag() const { return "(300a,00d5)"; }
143 bool setWedgeAngle(unsigned long idx, std::string parameter);
144
145 // WedgeFactor (300a,00d6) vr=DS, vm=1, type=2C
146 bool getWedgeFactor(unsigned long idx, std::string& parameter) const;
147 bool getWedgeFactor(DCMTree::TreePtr item, std::string& parameter) const;
148 std::string getWedgeFactorTag() const { return "(300a,00d6)"; }
149 bool setWedgeFactor(unsigned long idx, std::string parameter);
150
151 // WedgeID (300a,00d4) vr=SH, vm=1, type=3
152 bool getWedgeID(unsigned long idx, std::string& parameter) const;
153 bool getWedgeID(DCMTree::TreePtr item, std::string& parameter) const;
154 std::string getWedgeIDTag() const { return "(300a,00d4)"; }
155 bool setWedgeID(unsigned long idx, std::string parameter);
156
157 // WedgeNumber (300a,00d2) vr=IS, vm=1, type=1C
158 bool getWedgeNumber(unsigned long idx, std::string& parameter) const;
159 bool getWedgeNumber(DCMTree::TreePtr item, std::string& parameter) const;
160 std::string getWedgeNumberTag() const { return "(300a,00d2)"; }
161 bool setWedgeNumber(unsigned long idx, std::string parameter);
162
163 // WedgeOrientation (300a,00d8) vr=DS, vm=1, type=2C
164 bool getWedgeOrientation(unsigned long idx, std::string& parameter) const;
165 bool getWedgeOrientation(DCMTree::TreePtr item, std::string& parameter) const;
166 std::string getWedgeOrientationTag() const { return "(300a,00d8)"; }
167 bool setWedgeOrientation(unsigned long idx, std::string parameter);
168
169 // WedgeType (300a,00d3) vr=CS, vm=1, type=2C
170 bool getWedgeType(unsigned long idx, std::string& parameter) const;
171 bool getWedgeType(DCMTree::TreePtr item, std::string& parameter) const;
172 std::string getWedgeTypeTag() const { return "(300a,00d3)"; }
173 bool setWedgeType(unsigned long idx, std::string parameter);
174
175
178 void setSequence(std::vector<DcmDRTWedgeSequenceInterface::Item> dcmSequence) {
179 _itemVec = dcmSequence;
180 }
181
184 std::vector<DcmDRTWedgeSequenceInterface::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
212 _itemVec.push_back(DcmDRTWedgeSequenceInterface::Item());
213 return _itemVec[_itemVec.size()-1];
214 }
215
217 _itemVec.push_back(newItem);
218 }
219
222 bool insertItem(const size_t idx) {
223 if (_itemVec.size() > idx) {
224 std::vector<DcmDRTWedgeSequenceInterface::Item>::iterator it = _itemVec.begin();
225 std::advance(it, idx);
226 _itemVec.insert(it, DcmDRTWedgeSequenceInterface::Item());
227 return true;
228 }
229 return false;
230 }
231
234 bool removeItem(const size_t idx) {
235 if ( _itemVec.size() > idx ) {
236 std::vector<DcmDRTWedgeSequenceInterface::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<DcmDRTWedgeSequenceInterface::Item> _itemVec;
247};
248
250
251#endif // __mlDcmDRTWedgeSequenceInterface_H
252
253/* MeVis-Hidden-Components-Start */
254/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setWedgeNumber(std::string parameter)
bool setWedgeOrientation(std::string parameter)
bool setWedgeID(std::string parameter)
bool getWedgeOrientation(std::string &parameter) const
bool getSourceToWedgeTrayDistance(std::string &parameter) const
bool getAccessoryCode(std::string &parameter) const
bool getWedgeType(std::string &parameter) const
bool getWedgeID(std::string &parameter) const
bool setSourceToWedgeTrayDistance(std::string parameter)
bool getWedgeNumber(std::string &parameter) const
bool setWedgeFactor(std::string parameter)
bool getWedgeAngle(std::string &parameter) const
bool getWedgeFactor(std::string &parameter) const
bool setAccessoryCode(std::string parameter)
bool setWedgeType(std::string parameter)
bool setWedgeAngle(std::string parameter)
Class to provide access to DRTWedgeSequence.
bool getWedgeNumber(unsigned long idx, std::string &parameter) const
bool getWedgeType(unsigned long idx, std::string &parameter) const
DcmDRTWedgeSequenceInterface(std::vector< DcmDRTWedgeSequenceInterface::Item > dcmSequence)
Default Constructor.
DcmDRTWedgeSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getWedgeID(DCMTree::TreePtr item, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTWedgeSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setWedgeAngle(unsigned long idx, std::string parameter)
bool setSourceToWedgeTrayDistance(unsigned long idx, std::string parameter)
virtual ~DcmDRTWedgeSequenceInterface()
Default virtual Destructor.
bool getWedgeID(unsigned long idx, std::string &parameter) const
DcmDRTWedgeSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setWedgeID(unsigned long idx, std::string parameter)
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getWedgeOrientation(DCMTree::TreePtr item, std::string &parameter) const
bool getWedgeAngle(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTWedgeSequenceInterface::Item newItem)
bool hasSequence() const
Check if the DRTWedgeSequence is set.
DcmDRTWedgeSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool setWedgeFactor(unsigned long idx, std::string parameter)
bool getWedgeFactor(DCMTree::TreePtr item, std::string &parameter) const
bool getWedgeFactor(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTWedgeSequenceInterface::Item > dcmSequence)
Set the DRTWedgeSequence this interface class provides access to.
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getWedgeNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getSourceToWedgeTrayDistance(DCMTree::TreePtr item, std::string &parameter) const
bool getWedgeOrientation(unsigned long idx, std::string &parameter) const
bool getSourceToWedgeTrayDistance(unsigned long idx, std::string &parameter) const
bool setWedgeType(unsigned long idx, std::string parameter)
bool getWedgeType(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTWedgeSequenceInterface::Item > getSequence() const
Return the DRTWedgeSequence this interface class provides access to.
bool setWedgeOrientation(unsigned long idx, std::string parameter)
bool setWedgeNumber(unsigned long idx, std::string parameter)
bool getWedgeAngle(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