MeVisLab Toolbox Reference
mlDcmDRTChannelShieldSequenceInterface.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 __mlDcmDRTChannelShieldSequenceInterface_H
24#define __mlDcmDRTChannelShieldSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTChannelShieldSequenceInterface.h" //DRTChannelShieldSequence
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 // ChannelShieldID (300a,02b3) vr=SH, vm=1, type=2C
67 bool getChannelShieldID(std::string& parameter) const;
68 std::string getChannelShieldIDTag() const { return "(300a,02b3)"; }
69 bool setChannelShieldID(std::string parameter);
70
71 // ChannelShieldName (300a,02b4) vr=LO, vm=1, type=3
72 bool getChannelShieldName(std::string& parameter) const;
73 std::string getChannelShieldNameTag() const { return "(300a,02b4)"; }
74 bool setChannelShieldName(std::string parameter);
75
76 // ChannelShieldNominalThickness (300a,02b8) vr=DS, vm=1, type=3
77 bool getChannelShieldNominalThickness(std::string& parameter) const;
78 std::string getChannelShieldNominalThicknessTag() const { return "(300a,02b8)"; }
79 bool setChannelShieldNominalThickness(std::string parameter);
80
81 // ChannelShieldNominalTransmission (300a,02ba) vr=DS, vm=1, type=3
82 bool getChannelShieldNominalTransmission(std::string& parameter) const;
83 std::string getChannelShieldNominalTransmissionTag() const { return "(300a,02ba)"; }
84 bool setChannelShieldNominalTransmission(std::string parameter);
85
86 // ChannelShieldNumber (300a,02b2) vr=IS, vm=1, type=1C
87 bool getChannelShieldNumber(std::string& parameter) const;
88 std::string getChannelShieldNumberTag() const { return "(300a,02b2)"; }
89 bool setChannelShieldNumber(std::string parameter);
90
91 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
92 bool getMaterialID(std::string& parameter) const;
93 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
94 bool setMaterialID(std::string parameter);
95
96 // ReferencedROINumber (3006,0084) vr=IS, vm=1, type=2C
97 bool getReferencedROINumber(std::string& parameter) const;
98 std::string getReferencedROINumberTag() const { return "(3006,0084)"; }
99 bool setReferencedROINumber(std::string parameter);
100
101
102 private:
103
104 DCMTree::TreePtr _dcmItem;
105
106 };
107
109
111 DcmDRTChannelShieldSequenceInterface(std::vector<DcmDRTChannelShieldSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
112
119
122 // ChannelShieldID (300a,02b3) vr=SH, vm=1, type=2C
123 bool getChannelShieldID(unsigned long idx, std::string& parameter) const;
124 bool getChannelShieldID(DCMTree::TreePtr item, std::string& parameter) const;
125 std::string getChannelShieldIDTag() const { return "(300a,02b3)"; }
126 bool setChannelShieldID(unsigned long idx, std::string parameter);
127
128 // ChannelShieldName (300a,02b4) vr=LO, vm=1, type=3
129 bool getChannelShieldName(unsigned long idx, std::string& parameter) const;
130 bool getChannelShieldName(DCMTree::TreePtr item, std::string& parameter) const;
131 std::string getChannelShieldNameTag() const { return "(300a,02b4)"; }
132 bool setChannelShieldName(unsigned long idx, std::string parameter);
133
134 // ChannelShieldNominalThickness (300a,02b8) vr=DS, vm=1, type=3
135 bool getChannelShieldNominalThickness(unsigned long idx, std::string& parameter) const;
136 bool getChannelShieldNominalThickness(DCMTree::TreePtr item, std::string& parameter) const;
137 std::string getChannelShieldNominalThicknessTag() const { return "(300a,02b8)"; }
138 bool setChannelShieldNominalThickness(unsigned long idx, std::string parameter);
139
140 // ChannelShieldNominalTransmission (300a,02ba) vr=DS, vm=1, type=3
141 bool getChannelShieldNominalTransmission(unsigned long idx, std::string& parameter) const;
142 bool getChannelShieldNominalTransmission(DCMTree::TreePtr item, std::string& parameter) const;
143 std::string getChannelShieldNominalTransmissionTag() const { return "(300a,02ba)"; }
144 bool setChannelShieldNominalTransmission(unsigned long idx, std::string parameter);
145
146 // ChannelShieldNumber (300a,02b2) vr=IS, vm=1, type=1C
147 bool getChannelShieldNumber(unsigned long idx, std::string& parameter) const;
148 bool getChannelShieldNumber(DCMTree::TreePtr item, std::string& parameter) const;
149 std::string getChannelShieldNumberTag() const { return "(300a,02b2)"; }
150 bool setChannelShieldNumber(unsigned long idx, std::string parameter);
151
152 // MaterialID (300a,00e1) vr=SH, vm=1, type=3
153 bool getMaterialID(unsigned long idx, std::string& parameter) const;
154 bool getMaterialID(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getMaterialIDTag() const { return "(300a,00e1)"; }
156 bool setMaterialID(unsigned long idx, std::string parameter);
157
158 // ReferencedROINumber (3006,0084) vr=IS, vm=1, type=2C
159 bool getReferencedROINumber(unsigned long idx, std::string& parameter) const;
160 bool getReferencedROINumber(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getReferencedROINumberTag() const { return "(3006,0084)"; }
162 bool setReferencedROINumber(unsigned long idx, std::string parameter);
163
164
167 void setSequence(std::vector<DcmDRTChannelShieldSequenceInterface::Item> dcmSequence) {
168 _itemVec = dcmSequence;
169 }
170
173 std::vector<DcmDRTChannelShieldSequenceInterface::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(DcmDRTChannelShieldSequenceInterface::Item());
202 return _itemVec[_itemVec.size()-1];
203 }
204
208
211 bool insertItem(const size_t idx) {
212 if (_itemVec.size() > idx) {
213 std::vector<DcmDRTChannelShieldSequenceInterface::Item>::iterator it = _itemVec.begin();
214 std::advance(it, idx);
216 return true;
217 }
218 return false;
219 }
220
223 bool removeItem(const size_t idx) {
224 if ( _itemVec.size() > idx ) {
225 std::vector<DcmDRTChannelShieldSequenceInterface::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<DcmDRTChannelShieldSequenceInterface::Item> _itemVec;
236};
237
239
240#endif // __mlDcmDRTChannelShieldSequenceInterface_H
241
242/* MeVis-Hidden-Components-Start */
243/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setChannelShieldName(std::string parameter)
bool setMaterialID(std::string parameter)
bool getReferencedROINumber(std::string &parameter) const
bool setChannelShieldNominalThickness(std::string parameter)
bool setReferencedROINumber(std::string parameter)
bool getChannelShieldID(std::string &parameter) const
bool getChannelShieldName(std::string &parameter) const
bool setChannelShieldID(std::string parameter)
bool getMaterialID(std::string &parameter) const
bool setChannelShieldNumber(std::string parameter)
bool getChannelShieldNominalThickness(std::string &parameter) const
bool getChannelShieldNominalTransmission(std::string &parameter) const
bool setChannelShieldNominalTransmission(std::string parameter)
bool getChannelShieldNumber(std::string &parameter) const
Class to provide access to DRTChannelShieldSequence.
bool getChannelShieldName(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTChannelShieldSequenceInterface::Item > dcmSequence)
Set the DRTChannelShieldSequence this interface class provides access to.
bool getChannelShieldID(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool setChannelShieldNominalThickness(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTChannelShieldSequence is set.
bool getReferencedROINumber(DCMTree::TreePtr item, std::string &parameter) const
bool getChannelShieldNumber(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getChannelShieldNumber(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTChannelShieldSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
void addItem(DcmDRTChannelShieldSequenceInterface::Item newItem)
std::vector< DcmDRTChannelShieldSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setChannelShieldNominalTransmission(unsigned long idx, std::string parameter)
bool getMaterialID(DCMTree::TreePtr item, std::string &parameter) const
bool getReferencedROINumber(unsigned long idx, std::string &parameter) const
virtual ~DcmDRTChannelShieldSequenceInterface()
Default virtual Destructor.
DcmDRTChannelShieldSequenceInterface(std::vector< DcmDRTChannelShieldSequenceInterface::Item > dcmSequence)
Default Constructor.
DcmDRTChannelShieldSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getChannelShieldID(DCMTree::TreePtr item, std::string &parameter) const
bool setMaterialID(unsigned long idx, std::string parameter)
bool setChannelShieldName(unsigned long idx, std::string parameter)
bool getChannelShieldName(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTChannelShieldSequenceInterface::Item > getSequence() const
Return the DRTChannelShieldSequence this interface class provides access to.
bool getChannelShieldNominalTransmission(unsigned long idx, std::string &parameter) const
bool getMaterialID(unsigned long idx, std::string &parameter) const
bool setChannelShieldID(unsigned long idx, std::string parameter)
bool setReferencedROINumber(unsigned long idx, std::string parameter)
DcmDRTChannelShieldSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setChannelShieldNumber(unsigned long idx, std::string parameter)
bool getChannelShieldNominalThickness(DCMTree::TreePtr item, std::string &parameter) const
bool getChannelShieldNominalThickness(unsigned long idx, std::string &parameter) const
bool getChannelShieldNominalTransmission(DCMTree::TreePtr item, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
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