MeVisLab Toolbox Reference
mlDcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface.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 __mlDcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface_H
24#define __mlDcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface.h" //DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule
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 // ReferencedBrachyApplicationSetupNumber (300c,000c) vr=IS, vm=1, type=1C
67 bool getReferencedBrachyApplicationSetupNumber(std::string& parameter) const;
68 std::string getReferencedBrachyApplicationSetupNumberTag() const { return "(300c,000c)"; }
69 bool setReferencedBrachyApplicationSetupNumber(std::string parameter);
70
71
72 private:
73
74 DCMTree::TreePtr _dcmItem;
75
76 };
77
79
81 DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface(std::vector<DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
82
89
92 // ReferencedBrachyApplicationSetupNumber (300c,000c) vr=IS, vm=1, type=1C
93 bool getReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string& parameter) const;
95 std::string getReferencedBrachyApplicationSetupNumberTag() const { return "(300c,000c)"; }
96 bool setReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string parameter);
97
98
101 void setSequence(std::vector<DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item> dcmSequence) {
102 _itemVec = dcmSequence;
103 }
104
107 std::vector<DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item> getSequence() const {
108 return _itemVec;
109 }
110
113 bool hasSequence() const {
114 return (_itemVec.size() != 0);
115 }
116
120 return static_cast<MLint>(_itemVec.size());
121 }
122
131
138
142
145 bool insertItem(const size_t idx) {
146 if (_itemVec.size() > idx) {
147 std::vector<DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item>::iterator it = _itemVec.begin();
148 std::advance(it, idx);
150 return true;
151 }
152 return false;
153 }
154
157 bool removeItem(const size_t idx) {
158 if ( _itemVec.size() > idx ) {
159 std::vector<DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item>::iterator it = _itemVec.begin();
160 std::advance(it, idx);
161 _itemVec.erase(it);
162 return true;
163 }
164 return false;
165 }
166
167 protected:
169 std::vector<DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item> _itemVec;
170};
171
173
174#endif // __mlDcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface_H
175
176/* MeVis-Hidden-Components-Start */
177/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
std::vector< DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item > getSequence() const
Return the DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule this interface class provides ac...
std::vector< DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
void addItem(DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item newItem)
bool hasSequence() const
Check if the DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule is set.
DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface(std::vector< DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item > dcmSequence)
Default Constructor.
DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item & addItem()
Adds a new item to the sequence.
bool setReferencedBrachyApplicationSetupNumber(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item > dcmSequence)
Set the DRTReferencedBrachyApplicationSetupSequenceInRTDoseModule this interface class provides acces...
bool getReferencedBrachyApplicationSetupNumber(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTReferencedBrachyApplicationSetupSequenceInRTDoseModuleInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getReferencedBrachyApplicationSetupNumber(unsigned long idx, 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