MeVisLab Toolbox Reference
mlDcmDRTContourSequenceInterface.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 __mlDcmDRTContourSequenceInterface_H
24#define __mlDcmDRTContourSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTContourSequenceInterface.h" //DRTContourSequence
31#include "mlDcmDRTContourImageSequenceInterface.h" //DRTContourImageSequence
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 // AttachedContours (3006,0049) vr=IS, vm=1-n, type=3
68 bool getAttachedContours(std::string& parameter) const;
69 std::string getAttachedContoursTag() const { return "(3006,0049)"; }
70 bool setAttachedContours(std::string parameter);
71
72 // ContourData (3006,0050) vr=DS, vm=3-3n, type=1C
73 bool getContourData(std::string& parameter) const;
74 std::string getContourDataTag() const { return "(3006,0050)"; }
75 bool setContourData(std::string parameter);
76
77 // ContourGeometricType (3006,0042) vr=CS, vm=1, type=1C
78 bool getContourGeometricType(std::string& parameter) const;
79 std::string getContourGeometricTypeTag() const { return "(3006,0042)"; }
80 bool setContourGeometricType(std::string parameter);
81
82 // ContourNumber (3006,0048) vr=IS, vm=1, type=3
83 bool getContourNumber(std::string& parameter) const;
84 std::string getContourNumberTag() const { return "(3006,0048)"; }
85 bool setContourNumber(std::string parameter);
86
87 // ContourOffsetVector (3006,0045) vr=DS, vm=3, type=3
88 bool getContourOffsetVector(std::string& parameter) const;
89 std::string getContourOffsetVectorTag() const { return "(3006,0045)"; }
90 bool setContourOffsetVector(std::string parameter);
91
92 // ContourSlabThickness (3006,0044) vr=DS, vm=1, type=3
93 bool getContourSlabThickness(std::string& parameter) const;
94 std::string getContourSlabThicknessTag() const { return "(3006,0044)"; }
95 bool setContourSlabThickness(std::string parameter);
96
97 // NumberOfContourPoints (3006,0046) vr=IS, vm=1, type=1C
98 bool getNumberOfContourPoints(std::string& parameter) const;
99 std::string getNumberOfContourPointsTag() const { return "(3006,0046)"; }
100 bool setNumberOfContourPoints(std::string parameter);
101
102 // ContourImageSequence (3006,0016) vr=SQ, vm=1, type=3
104 std::string getContourImageSequenceTag() const { return std::string("(3006,0016)"); }
106
107
108 private:
109
110 DCMTree::TreePtr _dcmItem;
111
112 };
113
115
117 DcmDRTContourSequenceInterface(std::vector<DcmDRTContourSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
118
120 for(size_t i=0; i < treePtrSeq.size(); i++)
121 {
123 }
124 }
125
128 // AttachedContours (3006,0049) vr=IS, vm=1-n, type=3
129 bool getAttachedContours(unsigned long idx, std::string& parameter) const;
130 bool getAttachedContours(DCMTree::TreePtr item, std::string& parameter) const;
131 std::string getAttachedContoursTag() const { return "(3006,0049)"; }
132 bool setAttachedContours(unsigned long idx, std::string parameter);
133
134 // ContourData (3006,0050) vr=DS, vm=3-3n, type=1C
135 bool getContourData(unsigned long idx, std::string& parameter) const;
136 bool getContourData(DCMTree::TreePtr item, std::string& parameter) const;
137 std::string getContourDataTag() const { return "(3006,0050)"; }
138 bool setContourData(unsigned long idx, std::string parameter);
139
140 // ContourGeometricType (3006,0042) vr=CS, vm=1, type=1C
141 bool getContourGeometricType(unsigned long idx, std::string& parameter) const;
142 bool getContourGeometricType(DCMTree::TreePtr item, std::string& parameter) const;
143 std::string getContourGeometricTypeTag() const { return "(3006,0042)"; }
144 bool setContourGeometricType(unsigned long idx, std::string parameter);
145
146 // ContourNumber (3006,0048) vr=IS, vm=1, type=3
147 bool getContourNumber(unsigned long idx, std::string& parameter) const;
148 bool getContourNumber(DCMTree::TreePtr item, std::string& parameter) const;
149 std::string getContourNumberTag() const { return "(3006,0048)"; }
150 bool setContourNumber(unsigned long idx, std::string parameter);
151
152 // ContourOffsetVector (3006,0045) vr=DS, vm=3, type=3
153 bool getContourOffsetVector(unsigned long idx, std::string& parameter) const;
154 bool getContourOffsetVector(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getContourOffsetVectorTag() const { return "(3006,0045)"; }
156 bool setContourOffsetVector(unsigned long idx, std::string parameter);
157
158 // ContourSlabThickness (3006,0044) vr=DS, vm=1, type=3
159 bool getContourSlabThickness(unsigned long idx, std::string& parameter) const;
160 bool getContourSlabThickness(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getContourSlabThicknessTag() const { return "(3006,0044)"; }
162 bool setContourSlabThickness(unsigned long idx, std::string parameter);
163
164 // NumberOfContourPoints (3006,0046) vr=IS, vm=1, type=1C
165 bool getNumberOfContourPoints(unsigned long idx, std::string& parameter) const;
166 bool getNumberOfContourPoints(DCMTree::TreePtr item, std::string& parameter) const;
167 std::string getNumberOfContourPointsTag() const { return "(3006,0046)"; }
168 bool setNumberOfContourPoints(unsigned long idx, std::string parameter);
169
170 // ContourImageSequence (3006,0016) vr=SQ, vm=1, type=3
172 std::string getContourImageSequenceTag() const { return std::string("(3006,0016)"); }
174
175
178 void setSequence(std::vector<DcmDRTContourSequenceInterface::Item> dcmSequence) {
179 _itemVec = dcmSequence;
180 }
181
184 std::vector<DcmDRTContourSequenceInterface::Item> getSequence() const {
185 return _itemVec;
186 }
187
190 bool hasSequence() const {
191 return (_itemVec.size() != 0);
192 }
193
197 return static_cast<MLint>(_itemVec.size());
198 }
199
203 if (_itemVec.size() > idx) {
204 return _itemVec[idx];
205 }
207 }
208
212 _itemVec.push_back(DcmDRTContourSequenceInterface::Item());
213 return _itemVec[_itemVec.size()-1];
214 }
215
217 _itemVec.push_back(newItem);
218 }
219
222 bool insertItem(const size_t idx) {
223 if (_itemVec.size() > idx) {
224 std::vector<DcmDRTContourSequenceInterface::Item>::iterator it = _itemVec.begin();
225 std::advance(it, idx);
226 _itemVec.insert(it, DcmDRTContourSequenceInterface::Item());
227 return true;
228 }
229 return false;
230 }
231
234 bool removeItem(const size_t idx) {
235 if ( _itemVec.size() > idx ) {
236 std::vector<DcmDRTContourSequenceInterface::Item>::iterator it = _itemVec.begin();
237 std::advance(it, idx);
238 _itemVec.erase(it);
239 return true;
240 }
241 return false;
242 }
243
244 protected:
246 std::vector<DcmDRTContourSequenceInterface::Item> _itemVec;
247};
248
250
251#endif // __mlDcmDRTContourSequenceInterface_H
252
253/* MeVis-Hidden-Components-Start */
254/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTContourImageSequence.
bool setAttachedContours(std::string parameter)
bool getContourSlabThickness(std::string &parameter) const
bool setContourSlabThickness(std::string parameter)
bool setContourData(std::string parameter)
bool getContourOffsetVector(std::string &parameter) const
bool setContourNumber(std::string parameter)
void setContourImageSequence(DcmDRTContourImageSequenceInterface seq)
bool getNumberOfContourPoints(std::string &parameter) const
bool getContourNumber(std::string &parameter) const
bool setNumberOfContourPoints(std::string parameter)
bool setContourGeometricType(std::string parameter)
bool getContourGeometricType(std::string &parameter) const
bool setContourOffsetVector(std::string parameter)
bool getAttachedContours(std::string &parameter) const
bool getContourData(std::string &parameter) const
DcmDRTContourImageSequenceInterface getContourImageSequence() const
Class to provide access to DRTContourSequence.
bool getContourOffsetVector(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTContourSequenceInterface::Item newItem)
bool setContourNumber(unsigned long idx, std::string parameter)
bool getContourData(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getContourOffsetVector(unsigned long idx, std::string &parameter) const
bool setContourGeometricType(unsigned long idx, std::string parameter)
bool setContourData(unsigned long idx, std::string parameter)
DcmDRTContourSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getContourSlabThickness(DCMTree::TreePtr item, std::string &parameter) const
bool setAttachedContours(unsigned long idx, std::string parameter)
DcmDRTContourImageSequenceInterface getContourImageSequence(unsigned long idx) const
virtual ~DcmDRTContourSequenceInterface()
Default virtual Destructor.
bool getContourGeometricType(DCMTree::TreePtr item, std::string &parameter) const
bool getContourSlabThickness(unsigned long idx, std::string &parameter) const
void setContourImageSequence(DcmDRTContourImageSequenceInterface seq, unsigned long idx)
bool setContourOffsetVector(unsigned long idx, std::string parameter)
bool setContourSlabThickness(unsigned long idx, std::string parameter)
bool getNumberOfContourPoints(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTContourSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
DcmDRTContourSequenceInterface(std::vector< DcmDRTContourSequenceInterface::Item > dcmSequence)
Default Constructor.
DcmDRTContourSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getContourData(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTContourSequenceInterface::Item > getSequence() const
Return the DRTContourSequence this interface class provides access to.
bool getContourNumber(unsigned long idx, std::string &parameter) const
bool getContourGeometricType(unsigned long idx, std::string &parameter) const
bool getNumberOfContourPoints(DCMTree::TreePtr item, std::string &parameter) const
bool setNumberOfContourPoints(unsigned long idx, std::string parameter)
bool getAttachedContours(DCMTree::TreePtr item, std::string &parameter) const
void setSequence(std::vector< DcmDRTContourSequenceInterface::Item > dcmSequence)
Set the DRTContourSequence this interface class provides access to.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool hasSequence() const
Check if the DRTContourSequence is set.
bool getAttachedContours(unsigned long idx, std::string &parameter) const
DcmDRTContourSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getContourNumber(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTContourImageSequence.
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