MeVisLab Toolbox Reference
mlDcmDRTRecordedWedgeSequenceInterface.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 __mlDcmDRTRecordedWedgeSequenceInterface_H
24#define __mlDcmDRTRecordedWedgeSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTRecordedWedgeSequenceInterface.h" //DRTRecordedWedgeSequence
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 // WedgeAngle (300a,00d5) vr=IS, vm=1, type=2
72 bool getWedgeAngle(std::string& parameter) const;
73 std::string getWedgeAngleTag() const { return "(300a,00d5)"; }
74 bool setWedgeAngle(std::string parameter);
75
76 // WedgeID (300a,00d4) vr=SH, vm=1, type=3
77 bool getWedgeID(std::string& parameter) const;
78 std::string getWedgeIDTag() const { return "(300a,00d4)"; }
79 bool setWedgeID(std::string parameter);
80
81 // WedgeNumber (300a,00d2) vr=IS, vm=1, type=1
82 bool getWedgeNumber(std::string& parameter) const;
83 std::string getWedgeNumberTag() const { return "(300a,00d2)"; }
84 bool setWedgeNumber(std::string parameter);
85
86 // WedgeOrientation (300a,00d8) vr=DS, vm=1, type=2
87 bool getWedgeOrientation(std::string& parameter) const;
88 std::string getWedgeOrientationTag() const { return "(300a,00d8)"; }
89 bool setWedgeOrientation(std::string parameter);
90
91 // WedgeType (300a,00d3) vr=CS, vm=1, type=2
92 bool getWedgeType(std::string& parameter) const;
93 std::string getWedgeTypeTag() const { return "(300a,00d3)"; }
94 bool setWedgeType(std::string parameter);
95
96
97 private:
98
99 DCMTree::TreePtr _dcmItem;
100
101 };
102
104
106 DcmDRTRecordedWedgeSequenceInterface(std::vector<DcmDRTRecordedWedgeSequenceInterface::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 // WedgeAngle (300a,00d5) vr=IS, vm=1, type=2
124 bool getWedgeAngle(unsigned long idx, std::string& parameter) const;
125 bool getWedgeAngle(DCMTree::TreePtr item, std::string& parameter) const;
126 std::string getWedgeAngleTag() const { return "(300a,00d5)"; }
127 bool setWedgeAngle(unsigned long idx, std::string parameter);
128
129 // WedgeID (300a,00d4) vr=SH, vm=1, type=3
130 bool getWedgeID(unsigned long idx, std::string& parameter) const;
131 bool getWedgeID(DCMTree::TreePtr item, std::string& parameter) const;
132 std::string getWedgeIDTag() const { return "(300a,00d4)"; }
133 bool setWedgeID(unsigned long idx, std::string parameter);
134
135 // WedgeNumber (300a,00d2) vr=IS, vm=1, type=1
136 bool getWedgeNumber(unsigned long idx, std::string& parameter) const;
137 bool getWedgeNumber(DCMTree::TreePtr item, std::string& parameter) const;
138 std::string getWedgeNumberTag() const { return "(300a,00d2)"; }
139 bool setWedgeNumber(unsigned long idx, std::string parameter);
140
141 // WedgeOrientation (300a,00d8) vr=DS, vm=1, type=2
142 bool getWedgeOrientation(unsigned long idx, std::string& parameter) const;
143 bool getWedgeOrientation(DCMTree::TreePtr item, std::string& parameter) const;
144 std::string getWedgeOrientationTag() const { return "(300a,00d8)"; }
145 bool setWedgeOrientation(unsigned long idx, std::string parameter);
146
147 // WedgeType (300a,00d3) vr=CS, vm=1, type=2
148 bool getWedgeType(unsigned long idx, std::string& parameter) const;
149 bool getWedgeType(DCMTree::TreePtr item, std::string& parameter) const;
150 std::string getWedgeTypeTag() const { return "(300a,00d3)"; }
151 bool setWedgeType(unsigned long idx, std::string parameter);
152
153
156 void setSequence(std::vector<DcmDRTRecordedWedgeSequenceInterface::Item> dcmSequence) {
157 _itemVec = dcmSequence;
158 }
159
162 std::vector<DcmDRTRecordedWedgeSequenceInterface::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
190 _itemVec.push_back(DcmDRTRecordedWedgeSequenceInterface::Item());
191 return _itemVec[_itemVec.size()-1];
192 }
193
197
200 bool insertItem(const size_t idx) {
201 if (_itemVec.size() > idx) {
202 std::vector<DcmDRTRecordedWedgeSequenceInterface::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<DcmDRTRecordedWedgeSequenceInterface::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<DcmDRTRecordedWedgeSequenceInterface::Item> _itemVec;
225};
226
228
229#endif // __mlDcmDRTRecordedWedgeSequenceInterface_H
230
231/* MeVis-Hidden-Components-Start */
232/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getWedgeNumber(std::string &parameter) const
bool getWedgeOrientation(std::string &parameter) const
bool setWedgeNumber(std::string parameter)
bool getAccessoryCode(std::string &parameter) const
bool setWedgeOrientation(std::string parameter)
bool getWedgeID(std::string &parameter) const
bool getWedgeAngle(std::string &parameter) const
bool getWedgeType(std::string &parameter) const
bool setWedgeType(std::string parameter)
bool setAccessoryCode(std::string parameter)
bool setWedgeAngle(std::string parameter)
Class to provide access to DRTRecordedWedgeSequence.
void setSequence(std::vector< DcmDRTRecordedWedgeSequenceInterface::Item > dcmSequence)
Set the DRTRecordedWedgeSequence this interface class provides access to.
bool hasSequence() const
Check if the DRTRecordedWedgeSequence is set.
bool getWedgeType(unsigned long idx, std::string &parameter) const
DcmDRTRecordedWedgeSequenceInterface(std::vector< DcmDRTRecordedWedgeSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getWedgeNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setWedgeAngle(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
bool getAccessoryCode(DCMTree::TreePtr item, std::string &parameter) const
virtual ~DcmDRTRecordedWedgeSequenceInterface()
Default virtual Destructor.
bool getWedgeType(DCMTree::TreePtr item, std::string &parameter) const
bool setWedgeID(unsigned long idx, std::string parameter)
void addItem(DcmDRTRecordedWedgeSequenceInterface::Item newItem)
bool getWedgeID(unsigned long idx, std::string &parameter) const
DcmDRTRecordedWedgeSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getWedgeAngle(unsigned long idx, std::string &parameter) const
bool getWedgeID(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTRecordedWedgeSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getWedgeAngle(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTRecordedWedgeSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool setWedgeNumber(unsigned long idx, std::string parameter)
bool setWedgeType(unsigned long idx, std::string parameter)
bool getWedgeOrientation(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTRecordedWedgeSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool setWedgeOrientation(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getWedgeOrientation(unsigned long idx, std::string &parameter) const
bool getWedgeNumber(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTRecordedWedgeSequenceInterface::Item > getSequence() const
Return the DRTRecordedWedgeSequence this interface class provides access to.
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