MeVisLab Toolbox Reference
mlDcmDRTBrachyControlPointSequenceInterface.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 __mlDcmDRTBrachyControlPointSequenceInterface_H
24#define __mlDcmDRTBrachyControlPointSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTBrachyControlPointSequenceInterface.h" //DRTBrachyControlPointSequence
31#include "mlDcmDRTBrachyReferencedDoseReferenceSequenceInterface.h" //DRTBrachyReferencedDoseReferenceSequence
32
33
34// ML includes
35#ifndef __mlModuleIncludes_H
36#include "mlModuleIncludes.h"
37#endif
38
40
41// ------------------------------------------------------------------
43// ------------------------------------------------------------------
45{
46 public:
47
49 {
50 public:
51
52 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
53
55
56 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
57
58 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
59
60 virtual ~Item() {}
61
62 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
63
64 bool isValid() const { return _dcmItem.get() != nullptr; }
65
66
67 // ControlPoint3DPosition (300a,02d4) vr=DS, vm=3, type=3
68 bool getControlPoint3DPosition(std::string& parameter) const;
69 std::string getControlPoint3DPositionTag() const { return "(300a,02d4)"; }
70 bool setControlPoint3DPosition(std::string parameter);
71
72 // ControlPointIndex (300a,0112) vr=IS, vm=1, type=1
73 bool getControlPointIndex(std::string& parameter) const;
74 std::string getControlPointIndexTag() const { return "(300a,0112)"; }
75 bool setControlPointIndex(std::string parameter);
76
77 // ControlPointRelativePosition (300a,02d2) vr=DS, vm=1, type=1
78 bool getControlPointRelativePosition(std::string& parameter) const;
79 std::string getControlPointRelativePositionTag() const { return "(300a,02d2)"; }
80 bool setControlPointRelativePosition(std::string parameter);
81
82 // CumulativeTimeWeight (300a,02d6) vr=DS, vm=1, type=2
83 bool getCumulativeTimeWeight(std::string& parameter) const;
84 std::string getCumulativeTimeWeightTag() const { return "(300a,02d6)"; }
85 bool setCumulativeTimeWeight(std::string parameter);
86
87 // BrachyReferencedDoseReferenceSequence (300c,0055) vr=SQ, vm=1, type=3
89 std::string getBrachyReferencedDoseReferenceSequenceTag() const { return std::string("(300c,0055)"); }
91
92
93 private:
94
95 DCMTree::TreePtr _dcmItem;
96
97 };
98
100
102 DcmDRTBrachyControlPointSequenceInterface(std::vector<DcmDRTBrachyControlPointSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
103
110
113 // ControlPoint3DPosition (300a,02d4) vr=DS, vm=3, type=3
114 bool getControlPoint3DPosition(unsigned long idx, std::string& parameter) const;
115 bool getControlPoint3DPosition(DCMTree::TreePtr item, std::string& parameter) const;
116 std::string getControlPoint3DPositionTag() const { return "(300a,02d4)"; }
117 bool setControlPoint3DPosition(unsigned long idx, std::string parameter);
118
119 // ControlPointIndex (300a,0112) vr=IS, vm=1, type=1
120 bool getControlPointIndex(unsigned long idx, std::string& parameter) const;
121 bool getControlPointIndex(DCMTree::TreePtr item, std::string& parameter) const;
122 std::string getControlPointIndexTag() const { return "(300a,0112)"; }
123 bool setControlPointIndex(unsigned long idx, std::string parameter);
124
125 // ControlPointRelativePosition (300a,02d2) vr=DS, vm=1, type=1
126 bool getControlPointRelativePosition(unsigned long idx, std::string& parameter) const;
127 bool getControlPointRelativePosition(DCMTree::TreePtr item, std::string& parameter) const;
128 std::string getControlPointRelativePositionTag() const { return "(300a,02d2)"; }
129 bool setControlPointRelativePosition(unsigned long idx, std::string parameter);
130
131 // CumulativeTimeWeight (300a,02d6) vr=DS, vm=1, type=2
132 bool getCumulativeTimeWeight(unsigned long idx, std::string& parameter) const;
133 bool getCumulativeTimeWeight(DCMTree::TreePtr item, std::string& parameter) const;
134 std::string getCumulativeTimeWeightTag() const { return "(300a,02d6)"; }
135 bool setCumulativeTimeWeight(unsigned long idx, std::string parameter);
136
137 // BrachyReferencedDoseReferenceSequence (300c,0055) vr=SQ, vm=1, type=3
139 std::string getBrachyReferencedDoseReferenceSequenceTag() const { return std::string("(300c,0055)"); }
141
142
145 void setSequence(std::vector<DcmDRTBrachyControlPointSequenceInterface::Item> dcmSequence) {
146 _itemVec = dcmSequence;
147 }
148
151 std::vector<DcmDRTBrachyControlPointSequenceInterface::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<DcmDRTBrachyControlPointSequenceInterface::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<DcmDRTBrachyControlPointSequenceInterface::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<DcmDRTBrachyControlPointSequenceInterface::Item> _itemVec;
214};
215
217
218#endif // __mlDcmDRTBrachyControlPointSequenceInterface_H
219
220/* MeVis-Hidden-Components-Start */
221/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
void setBrachyReferencedDoseReferenceSequence(DcmDRTBrachyReferencedDoseReferenceSequenceInterface seq)
bool setControlPointRelativePosition(std::string parameter)
bool setControlPoint3DPosition(std::string parameter)
DcmDRTBrachyReferencedDoseReferenceSequenceInterface getBrachyReferencedDoseReferenceSequence() const
bool setCumulativeTimeWeight(std::string parameter)
bool getControlPoint3DPosition(std::string &parameter) const
bool getCumulativeTimeWeight(std::string &parameter) const
bool getControlPointIndex(std::string &parameter) const
bool getControlPointRelativePosition(std::string &parameter) const
Class to provide access to DRTBrachyControlPointSequence.
DcmDRTBrachyReferencedDoseReferenceSequenceInterface getBrachyReferencedDoseReferenceSequence(unsigned long idx) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setControlPoint3DPosition(unsigned long idx, std::string parameter)
bool getControlPoint3DPosition(DCMTree::TreePtr item, std::string &parameter) const
bool setCumulativeTimeWeight(unsigned long idx, std::string parameter)
bool setControlPointIndex(unsigned long idx, std::string parameter)
DcmDRTBrachyControlPointSequenceInterface::Item & addItem()
Adds a new item to the sequence.
std::vector< DcmDRTBrachyControlPointSequenceInterface::Item > getSequence() const
Return the DRTBrachyControlPointSequence this interface class provides access to.
DcmDRTBrachyControlPointSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getCumulativeTimeWeight(unsigned long idx, std::string &parameter) const
bool getControlPointRelativePosition(DCMTree::TreePtr item, std::string &parameter) const
bool getControlPointIndex(DCMTree::TreePtr item, std::string &parameter) const
void setBrachyReferencedDoseReferenceSequence(DcmDRTBrachyReferencedDoseReferenceSequenceInterface seq, unsigned long idx)
bool getControlPointIndex(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setControlPointRelativePosition(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool hasSequence() const
Check if the DRTBrachyControlPointSequence is set.
void addItem(DcmDRTBrachyControlPointSequenceInterface::Item newItem)
bool getCumulativeTimeWeight(DCMTree::TreePtr item, std::string &parameter) const
bool getControlPoint3DPosition(unsigned long idx, std::string &parameter) const
bool getControlPointRelativePosition(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTBrachyControlPointSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
DcmDRTBrachyControlPointSequenceInterface(std::vector< DcmDRTBrachyControlPointSequenceInterface::Item > dcmSequence)
Default Constructor.
void setSequence(std::vector< DcmDRTBrachyControlPointSequenceInterface::Item > dcmSequence)
Set the DRTBrachyControlPointSequence this interface class provides access to.
Class to provide access to DRTBrachyReferencedDoseReferenceSequence.
Class to provide access to DRTBrachyReferencedDoseReferenceSequence.
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