MeVisLab Toolbox Reference
mlDcmDRTStructureSetROISequenceInterface.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 __mlDcmDRTStructureSetROISequenceInterface_H
24#define __mlDcmDRTStructureSetROISequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTStructureSetROISequenceInterface.h" //DRTStructureSetROISequence
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 // ROIDescription (3006,0028) vr=ST, vm=1, type=3
67 bool getROIDescription(std::string& parameter) const;
68 std::string getROIDescriptionTag() const { return "(3006,0028)"; }
69 bool setROIDescription(std::string parameter);
70
71 // ROIGenerationAlgorithm (3006,0036) vr=CS, vm=1, type=2C
72 bool getROIGenerationAlgorithm(std::string& parameter) const;
73 std::string getROIGenerationAlgorithmTag() const { return "(3006,0036)"; }
74 bool setROIGenerationAlgorithm(std::string parameter);
75
76 // ROIGenerationDescription (3006,0038) vr=LO, vm=1, type=3
77 bool getROIGenerationDescription(std::string& parameter) const;
78 std::string getROIGenerationDescriptionTag() const { return "(3006,0038)"; }
79 bool setROIGenerationDescription(std::string parameter);
80
81 // ROIName (3006,0026) vr=LO, vm=1, type=2C
82 bool getROIName(std::string& parameter) const;
83 std::string getROINameTag() const { return "(3006,0026)"; }
84 bool setROIName(std::string parameter);
85
86 // ROINumber (3006,0022) vr=IS, vm=1, type=1C
87 bool getROINumber(std::string& parameter) const;
88 std::string getROINumberTag() const { return "(3006,0022)"; }
89 bool setROINumber(std::string parameter);
90
91 // ROIVolume (3006,002c) vr=DS, vm=1, type=3
92 bool getROIVolume(std::string& parameter) const;
93 std::string getROIVolumeTag() const { return "(3006,002c)"; }
94 bool setROIVolume(std::string parameter);
95
96 // ReferencedFrameOfReferenceUID (3006,0024) vr=UI, vm=1, type=1C
97 bool getReferencedFrameOfReferenceUID(std::string& parameter) const;
98 std::string getReferencedFrameOfReferenceUIDTag() const { return "(3006,0024)"; }
99 bool setReferencedFrameOfReferenceUID(std::string parameter);
100
101
102 private:
103
104 DCMTree::TreePtr _dcmItem;
105
106 };
107
109
111 DcmDRTStructureSetROISequenceInterface(std::vector<DcmDRTStructureSetROISequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
112
119
122 // ROIDescription (3006,0028) vr=ST, vm=1, type=3
123 bool getROIDescription(unsigned long idx, std::string& parameter) const;
124 bool getROIDescription(DCMTree::TreePtr item, std::string& parameter) const;
125 std::string getROIDescriptionTag() const { return "(3006,0028)"; }
126 bool setROIDescription(unsigned long idx, std::string parameter);
127
128 // ROIGenerationAlgorithm (3006,0036) vr=CS, vm=1, type=2C
129 bool getROIGenerationAlgorithm(unsigned long idx, std::string& parameter) const;
130 bool getROIGenerationAlgorithm(DCMTree::TreePtr item, std::string& parameter) const;
131 std::string getROIGenerationAlgorithmTag() const { return "(3006,0036)"; }
132 bool setROIGenerationAlgorithm(unsigned long idx, std::string parameter);
133
134 // ROIGenerationDescription (3006,0038) vr=LO, vm=1, type=3
135 bool getROIGenerationDescription(unsigned long idx, std::string& parameter) const;
136 bool getROIGenerationDescription(DCMTree::TreePtr item, std::string& parameter) const;
137 std::string getROIGenerationDescriptionTag() const { return "(3006,0038)"; }
138 bool setROIGenerationDescription(unsigned long idx, std::string parameter);
139
140 // ROIName (3006,0026) vr=LO, vm=1, type=2C
141 bool getROIName(unsigned long idx, std::string& parameter) const;
142 bool getROIName(DCMTree::TreePtr item, std::string& parameter) const;
143 std::string getROINameTag() const { return "(3006,0026)"; }
144 bool setROIName(unsigned long idx, std::string parameter);
145
146 // ROINumber (3006,0022) vr=IS, vm=1, type=1C
147 bool getROINumber(unsigned long idx, std::string& parameter) const;
148 bool getROINumber(DCMTree::TreePtr item, std::string& parameter) const;
149 std::string getROINumberTag() const { return "(3006,0022)"; }
150 bool setROINumber(unsigned long idx, std::string parameter);
151
152 // ROIVolume (3006,002c) vr=DS, vm=1, type=3
153 bool getROIVolume(unsigned long idx, std::string& parameter) const;
154 bool getROIVolume(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getROIVolumeTag() const { return "(3006,002c)"; }
156 bool setROIVolume(unsigned long idx, std::string parameter);
157
158 // ReferencedFrameOfReferenceUID (3006,0024) vr=UI, vm=1, type=1C
159 bool getReferencedFrameOfReferenceUID(unsigned long idx, std::string& parameter) const;
160 bool getReferencedFrameOfReferenceUID(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getReferencedFrameOfReferenceUIDTag() const { return "(3006,0024)"; }
162 bool setReferencedFrameOfReferenceUID(unsigned long idx, std::string parameter);
163
164
167 void setSequence(std::vector<DcmDRTStructureSetROISequenceInterface::Item> dcmSequence) {
168 _itemVec = dcmSequence;
169 }
170
173 std::vector<DcmDRTStructureSetROISequenceInterface::Item> getSequence() const {
174 return _itemVec;
175 }
176
179 bool hasSequence() const {
180 return (_itemVec.size() != 0);
181 }
182
186 return static_cast<MLint>(_itemVec.size());
187 }
188
192 if (_itemVec.size() > idx) {
193 return _itemVec[idx];
194 }
196 }
197
202 return _itemVec[_itemVec.size()-1];
203 }
204
208
211 bool insertItem(const size_t idx) {
212 if (_itemVec.size() > idx) {
213 std::vector<DcmDRTStructureSetROISequenceInterface::Item>::iterator it = _itemVec.begin();
214 std::advance(it, idx);
216 return true;
217 }
218 return false;
219 }
220
223 bool removeItem(const size_t idx) {
224 if ( _itemVec.size() > idx ) {
225 std::vector<DcmDRTStructureSetROISequenceInterface::Item>::iterator it = _itemVec.begin();
226 std::advance(it, idx);
227 _itemVec.erase(it);
228 return true;
229 }
230 return false;
231 }
232
233 protected:
235 std::vector<DcmDRTStructureSetROISequenceInterface::Item> _itemVec;
236};
237
239
240#endif // __mlDcmDRTStructureSetROISequenceInterface_H
241
242/* MeVis-Hidden-Components-Start */
243/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool setROIGenerationAlgorithm(std::string parameter)
bool getROIName(std::string &parameter) const
bool setReferencedFrameOfReferenceUID(std::string parameter)
bool getROIVolume(std::string &parameter) const
bool setROIDescription(std::string parameter)
bool getReferencedFrameOfReferenceUID(std::string &parameter) const
bool setROIGenerationDescription(std::string parameter)
bool getROIGenerationAlgorithm(std::string &parameter) const
bool getROIGenerationDescription(std::string &parameter) const
bool getROINumber(std::string &parameter) const
bool getROIDescription(std::string &parameter) const
Class to provide access to DRTStructureSetROISequence.
bool setROINumber(unsigned long idx, std::string parameter)
bool setReferencedFrameOfReferenceUID(unsigned long idx, std::string parameter)
bool getROINumber(DCMTree::TreePtr item, std::string &parameter) const
bool setROIName(unsigned long idx, std::string parameter)
std::vector< DcmDRTStructureSetROISequenceInterface::Item > getSequence() const
Return the DRTStructureSetROISequence this interface class provides access to.
virtual ~DcmDRTStructureSetROISequenceInterface()
Default virtual Destructor.
bool setROIGenerationAlgorithm(unsigned long idx, std::string parameter)
bool getROIName(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTStructureSetROISequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getROIVolume(DCMTree::TreePtr item, std::string &parameter) const
void setSequence(std::vector< DcmDRTStructureSetROISequenceInterface::Item > dcmSequence)
Set the DRTStructureSetROISequence this interface class provides access to.
DcmDRTStructureSetROISequenceInterface(std::vector< DcmDRTStructureSetROISequenceInterface::Item > dcmSequence)
Default Constructor.
bool getROIDescription(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTStructureSetROISequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getROIGenerationAlgorithm(DCMTree::TreePtr item, std::string &parameter) const
bool getROIVolume(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getROIGenerationDescription(DCMTree::TreePtr item, std::string &parameter) const
bool setROIDescription(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool hasSequence() const
Check if the DRTStructureSetROISequence is set.
bool getReferencedFrameOfReferenceUID(unsigned long idx, std::string &parameter) const
bool getReferencedFrameOfReferenceUID(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool setROIGenerationDescription(unsigned long idx, std::string parameter)
void addItem(DcmDRTStructureSetROISequenceInterface::Item newItem)
bool getROIGenerationDescription(unsigned long idx, std::string &parameter) const
DcmDRTStructureSetROISequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getROIDescription(unsigned long idx, std::string &parameter) const
bool getROINumber(unsigned long idx, std::string &parameter) const
bool getROIName(unsigned long idx, std::string &parameter) const
bool setROIVolume(unsigned long idx, std::string parameter)
bool getROIGenerationAlgorithm(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