MeVisLab Toolbox Reference
mlDcmDRTReferencedBeamSequenceInRTDoseModuleInterface.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 __mlDcmDRTReferencedBeamSequenceInRTDoseModuleInterface_H
24#define __mlDcmDRTReferencedBeamSequenceInRTDoseModuleInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTReferencedBeamSequenceInRTDoseModuleInterface.h" //DRTReferencedBeamSequenceInRTDoseModule
31#include "mlDcmDRTReferencedControlPointSequenceInterface.h" //DRTReferencedControlPointSequence
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 // ReferencedBeamNumber (300c,0006) vr=IS, vm=1, type=1C
68 bool getReferencedBeamNumber(std::string& parameter) const;
69 std::string getReferencedBeamNumberTag() const { return "(300c,0006)"; }
70 bool setReferencedBeamNumber(std::string parameter);
71
72 // ReferencedBrachyApplicationSetupNumber (300c,000c) vr=IS, vm=1, type=1C
73 bool getReferencedBrachyApplicationSetupNumber(std::string& parameter) const;
74 std::string getReferencedBrachyApplicationSetupNumberTag() const { return "(300c,000c)"; }
75 bool setReferencedBrachyApplicationSetupNumber(std::string parameter);
76
77 // ReferencedControlPointSequence (300c,00f2) vr=SQ, vm=1, type=1C
79 std::string getReferencedControlPointSequenceTag() const { return std::string("(300c,00f2)"); }
81
82
83 private:
84
85 DCMTree::TreePtr _dcmItem;
86
87 };
88
90
92 DcmDRTReferencedBeamSequenceInRTDoseModuleInterface(std::vector<DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
93
100
103 // ReferencedBeamNumber (300c,0006) vr=IS, vm=1, type=1C
104 bool getReferencedBeamNumber(unsigned long idx, std::string& parameter) const;
105 bool getReferencedBeamNumber(DCMTree::TreePtr item, std::string& parameter) const;
106 std::string getReferencedBeamNumberTag() const { return "(300c,0006)"; }
107 bool setReferencedBeamNumber(unsigned long idx, std::string parameter);
108
109 // ReferencedBrachyApplicationSetupNumber (300c,000c) vr=IS, vm=1, type=1C
110 bool getReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string& parameter) const;
112 std::string getReferencedBrachyApplicationSetupNumberTag() const { return "(300c,000c)"; }
113 bool setReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string parameter);
114
115 // ReferencedControlPointSequence (300c,00f2) vr=SQ, vm=1, type=1C
117 std::string getReferencedControlPointSequenceTag() const { return std::string("(300c,00f2)"); }
119
120
123 void setSequence(std::vector<DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item> dcmSequence) {
124 _itemVec = dcmSequence;
125 }
126
129 std::vector<DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item> getSequence() const {
130 return _itemVec;
131 }
132
135 bool hasSequence() const {
136 return (_itemVec.size() != 0);
137 }
138
142 return static_cast<MLint>(_itemVec.size());
143 }
144
148 if (_itemVec.size() > idx) {
149 return _itemVec[idx];
150 }
152 }
153
160
164
167 bool insertItem(const size_t idx) {
168 if (_itemVec.size() > idx) {
169 std::vector<DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item>::iterator it = _itemVec.begin();
170 std::advance(it, idx);
172 return true;
173 }
174 return false;
175 }
176
179 bool removeItem(const size_t idx) {
180 if ( _itemVec.size() > idx ) {
181 std::vector<DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item>::iterator it = _itemVec.begin();
182 std::advance(it, idx);
183 _itemVec.erase(it);
184 return true;
185 }
186 return false;
187 }
188
189 protected:
191 std::vector<DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item> _itemVec;
192};
193
195
196#endif // __mlDcmDRTReferencedBeamSequenceInRTDoseModuleInterface_H
197
198/* MeVis-Hidden-Components-Start */
199/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getReferencedBeamNumber(std::string &parameter) const
void setReferencedControlPointSequence(DcmDRTReferencedControlPointSequenceInterface seq)
DcmDRTReferencedControlPointSequenceInterface getReferencedControlPointSequence() const
bool getReferencedBrachyApplicationSetupNumber(std::string &parameter) const
Class to provide access to DRTReferencedBeamSequenceInRTDoseModule.
bool setReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string parameter)
bool getReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item > getSequence() const
Return the DRTReferencedBeamSequenceInRTDoseModule this interface class provides access to.
std::vector< DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getReferencedBeamNumber(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTReferencedControlPointSequenceInterface getReferencedControlPointSequence(unsigned long idx) const
bool hasSequence() const
Check if the DRTReferencedBeamSequenceInRTDoseModule is set.
void addItem(DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item newItem)
void setSequence(std::vector< DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item > dcmSequence)
Set the DRTReferencedBeamSequenceInRTDoseModule this interface class provides access to.
void setReferencedControlPointSequence(DcmDRTReferencedControlPointSequenceInterface seq, unsigned long idx)
DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item & addItem()
Adds a new item to the sequence.
bool getReferencedBrachyApplicationSetupNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setReferencedBeamNumber(unsigned long idx, std::string parameter)
DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
DcmDRTReferencedBeamSequenceInRTDoseModuleInterface(std::vector< DcmDRTReferencedBeamSequenceInRTDoseModuleInterface::Item > dcmSequence)
Default Constructor.
bool getReferencedBeamNumber(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
Class to provide access to DRTReferencedControlPointSequence.
Class to provide access to DRTReferencedControlPointSequence.
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