MeVisLab Toolbox Reference
mlDcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface.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 __mlDcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface_H
24#define __mlDcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface.h" //DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule
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 // RangeShifterSetting (300a,0362) vr=LO, vm=1, type=1
67 bool getRangeShifterSetting(std::string& parameter) const;
68 std::string getRangeShifterSettingTag() const { return "(300a,0362)"; }
69 bool setRangeShifterSetting(std::string parameter);
70
71 // ReferencedRangeShifterNumber (300c,0100) vr=IS, vm=1, type=1
72 bool getReferencedRangeShifterNumber(std::string& parameter) const;
73 std::string getReferencedRangeShifterNumberTag() const { return "(300c,0100)"; }
74 bool setReferencedRangeShifterNumber(std::string parameter);
75
76
77 private:
78
79 DCMTree::TreePtr _dcmItem;
80
81 };
82
84
86 DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface(std::vector<DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
87
94
97 // RangeShifterSetting (300a,0362) vr=LO, vm=1, type=1
98 bool getRangeShifterSetting(unsigned long idx, std::string& parameter) const;
99 bool getRangeShifterSetting(DCMTree::TreePtr item, std::string& parameter) const;
100 std::string getRangeShifterSettingTag() const { return "(300a,0362)"; }
101 bool setRangeShifterSetting(unsigned long idx, std::string parameter);
102
103 // ReferencedRangeShifterNumber (300c,0100) vr=IS, vm=1, type=1
104 bool getReferencedRangeShifterNumber(unsigned long idx, std::string& parameter) const;
105 bool getReferencedRangeShifterNumber(DCMTree::TreePtr item, std::string& parameter) const;
106 std::string getReferencedRangeShifterNumberTag() const { return "(300c,0100)"; }
107 bool setReferencedRangeShifterNumber(unsigned long idx, std::string parameter);
108
109
112 void setSequence(std::vector<DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item> dcmSequence) {
113 _itemVec = dcmSequence;
114 }
115
118 std::vector<DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item> getSequence() const {
119 return _itemVec;
120 }
121
124 bool hasSequence() const {
125 return (_itemVec.size() != 0);
126 }
127
131 return static_cast<MLint>(_itemVec.size());
132 }
133
142
149
153
156 bool insertItem(const size_t idx) {
157 if (_itemVec.size() > idx) {
158 std::vector<DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item>::iterator it = _itemVec.begin();
159 std::advance(it, idx);
161 return true;
162 }
163 return false;
164 }
165
168 bool removeItem(const size_t idx) {
169 if ( _itemVec.size() > idx ) {
170 std::vector<DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item>::iterator it = _itemVec.begin();
171 std::advance(it, idx);
172 _itemVec.erase(it);
173 return true;
174 }
175 return false;
176 }
177
178 protected:
180 std::vector<DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item> _itemVec;
181};
182
184
185#endif // __mlDcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface_H
186
187/* MeVis-Hidden-Components-Start */
188/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
void addItem(DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item newItem)
std::vector< DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item & addItem()
Adds a new item to the sequence.
bool getReferencedRangeShifterNumber(unsigned long idx, std::string &parameter) const
bool getReferencedRangeShifterNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getRangeShifterSetting(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface(std::vector< DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item > dcmSequence)
Default Constructor.
bool getRangeShifterSetting(unsigned long idx, std::string &parameter) const
bool setReferencedRangeShifterNumber(unsigned long idx, std::string parameter)
bool setRangeShifterSetting(unsigned long idx, std::string parameter)
std::vector< DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item > getSequence() const
Return the DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule this interface class provid...
DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool hasSequence() const
Check if the DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule is set.
void setSequence(std::vector< DcmDRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModuleInterface::Item > dcmSequence)
Set the DRTRangeShifterSettingsSequenceInRTIonBeamsSessionRecordModule this interface class provides ...
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