MeVisLab Toolbox Reference
mlDcmDRTLateralSpreadingDeviceSequenceInterface.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 __mlDcmDRTLateralSpreadingDeviceSequenceInterface_H
24#define __mlDcmDRTLateralSpreadingDeviceSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTLateralSpreadingDeviceSequenceInterface.h" //DRTLateralSpreadingDeviceSequence
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 // LateralSpreadingDeviceDescription (300a,033a) vr=LO, vm=1, type=3
72 bool getLateralSpreadingDeviceDescription(std::string& parameter) const;
73 std::string getLateralSpreadingDeviceDescriptionTag() const { return "(300a,033a)"; }
74 bool setLateralSpreadingDeviceDescription(std::string parameter);
75
76 // LateralSpreadingDeviceID (300a,0336) vr=SH, vm=1, type=1
77 bool getLateralSpreadingDeviceID(std::string& parameter) const;
78 std::string getLateralSpreadingDeviceIDTag() const { return "(300a,0336)"; }
79 bool setLateralSpreadingDeviceID(std::string parameter);
80
81 // LateralSpreadingDeviceNumber (300a,0334) vr=IS, vm=1, type=1
82 bool getLateralSpreadingDeviceNumber(std::string& parameter) const;
83 std::string getLateralSpreadingDeviceNumberTag() const { return "(300a,0334)"; }
84 bool setLateralSpreadingDeviceNumber(std::string parameter);
85
86 // LateralSpreadingDeviceType (300a,0338) vr=CS, vm=1, type=1
87 bool getLateralSpreadingDeviceType(std::string& parameter) const;
88 std::string getLateralSpreadingDeviceTypeTag() const { return "(300a,0338)"; }
89 bool setLateralSpreadingDeviceType(std::string parameter);
90
91
92 private:
93
94 DCMTree::TreePtr _dcmItem;
95
96 };
97
99
101 DcmDRTLateralSpreadingDeviceSequenceInterface(std::vector<DcmDRTLateralSpreadingDeviceSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
102
109
112 // AccessoryCode (300a,00f9) vr=LO, vm=1, type=3
113 bool getAccessoryCode(unsigned long idx, std::string& parameter) const;
114 bool getAccessoryCode(DCMTree::TreePtr item, std::string& parameter) const;
115 std::string getAccessoryCodeTag() const { return "(300a,00f9)"; }
116 bool setAccessoryCode(unsigned long idx, std::string parameter);
117
118 // LateralSpreadingDeviceDescription (300a,033a) vr=LO, vm=1, type=3
119 bool getLateralSpreadingDeviceDescription(unsigned long idx, std::string& parameter) const;
120 bool getLateralSpreadingDeviceDescription(DCMTree::TreePtr item, std::string& parameter) const;
121 std::string getLateralSpreadingDeviceDescriptionTag() const { return "(300a,033a)"; }
122 bool setLateralSpreadingDeviceDescription(unsigned long idx, std::string parameter);
123
124 // LateralSpreadingDeviceID (300a,0336) vr=SH, vm=1, type=1
125 bool getLateralSpreadingDeviceID(unsigned long idx, std::string& parameter) const;
126 bool getLateralSpreadingDeviceID(DCMTree::TreePtr item, std::string& parameter) const;
127 std::string getLateralSpreadingDeviceIDTag() const { return "(300a,0336)"; }
128 bool setLateralSpreadingDeviceID(unsigned long idx, std::string parameter);
129
130 // LateralSpreadingDeviceNumber (300a,0334) vr=IS, vm=1, type=1
131 bool getLateralSpreadingDeviceNumber(unsigned long idx, std::string& parameter) const;
132 bool getLateralSpreadingDeviceNumber(DCMTree::TreePtr item, std::string& parameter) const;
133 std::string getLateralSpreadingDeviceNumberTag() const { return "(300a,0334)"; }
134 bool setLateralSpreadingDeviceNumber(unsigned long idx, std::string parameter);
135
136 // LateralSpreadingDeviceType (300a,0338) vr=CS, vm=1, type=1
137 bool getLateralSpreadingDeviceType(unsigned long idx, std::string& parameter) const;
138 bool getLateralSpreadingDeviceType(DCMTree::TreePtr item, std::string& parameter) const;
139 std::string getLateralSpreadingDeviceTypeTag() const { return "(300a,0338)"; }
140 bool setLateralSpreadingDeviceType(unsigned long idx, std::string parameter);
141
142
145 void setSequence(std::vector<DcmDRTLateralSpreadingDeviceSequenceInterface::Item> dcmSequence) {
146 _itemVec = dcmSequence;
147 }
148
151 std::vector<DcmDRTLateralSpreadingDeviceSequenceInterface::Item> getSequence() const {
152 return _itemVec;
153 }
154
157 bool hasSequence() const {
158 return (_itemVec.size() != 0);
159 }
160
164 return static_cast<MLint>(_itemVec.size());
165 }
166
170 if (_itemVec.size() > idx) {
171 return _itemVec[idx];
172 }
174 }
175
180 return _itemVec[_itemVec.size()-1];
181 }
182
186
189 bool insertItem(const size_t idx) {
190 if (_itemVec.size() > idx) {
191 std::vector<DcmDRTLateralSpreadingDeviceSequenceInterface::Item>::iterator it = _itemVec.begin();
192 std::advance(it, idx);
194 return true;
195 }
196 return false;
197 }
198
201 bool removeItem(const size_t idx) {
202 if ( _itemVec.size() > idx ) {
203 std::vector<DcmDRTLateralSpreadingDeviceSequenceInterface::Item>::iterator it = _itemVec.begin();
204 std::advance(it, idx);
205 _itemVec.erase(it);
206 return true;
207 }
208 return false;
209 }
210
211 protected:
213 std::vector<DcmDRTLateralSpreadingDeviceSequenceInterface::Item> _itemVec;
214};
215
217
218#endif // __mlDcmDRTLateralSpreadingDeviceSequenceInterface_H
219
220/* MeVis-Hidden-Components-Start */
221/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setLateralSpreadingDeviceNumber(std::string parameter)
bool getAccessoryCode(std::string &parameter) const
bool getLateralSpreadingDeviceType(std::string &parameter) const
bool getLateralSpreadingDeviceID(std::string &parameter) const
bool setLateralSpreadingDeviceDescription(std::string parameter)
bool getLateralSpreadingDeviceNumber(std::string &parameter) const
bool getLateralSpreadingDeviceDescription(std::string &parameter) const
Class to provide access to DRTLateralSpreadingDeviceSequence.
DcmDRTLateralSpreadingDeviceSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setLateralSpreadingDeviceType(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTLateralSpreadingDeviceSequence is set.
bool getLateralSpreadingDeviceDescription(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTLateralSpreadingDeviceSequenceInterface::Item newItem)
bool setLateralSpreadingDeviceID(unsigned long idx, std::string parameter)
bool setLateralSpreadingDeviceNumber(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTLateralSpreadingDeviceSequenceInterface::Item > dcmSequence)
Set the DRTLateralSpreadingDeviceSequence this interface class provides access to.
std::vector< DcmDRTLateralSpreadingDeviceSequenceInterface::Item > getSequence() const
Return the DRTLateralSpreadingDeviceSequence this interface class provides access to.
DcmDRTLateralSpreadingDeviceSequenceInterface::Item & addItem()
Adds a new item to the sequence.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setLateralSpreadingDeviceDescription(unsigned long idx, std::string parameter)
bool getLateralSpreadingDeviceType(DCMTree::TreePtr item, std::string &parameter) const
bool getLateralSpreadingDeviceNumber(DCMTree::TreePtr item, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
DcmDRTLateralSpreadingDeviceSequenceInterface(std::vector< DcmDRTLateralSpreadingDeviceSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getLateralSpreadingDeviceID(DCMTree::TreePtr item, std::string &parameter) const
bool getLateralSpreadingDeviceType(unsigned long idx, std::string &parameter) const
bool getLateralSpreadingDeviceDescription(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTLateralSpreadingDeviceSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getLateralSpreadingDeviceNumber(unsigned long idx, std::string &parameter) const
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool getLateralSpreadingDeviceID(unsigned long idx, std::string &parameter) const
bool getAccessoryCode(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getAccessoryCode(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