MeVisLab Toolbox Reference
mlDcmDRTPatientSetupSequenceInterface.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 __mlDcmDRTPatientSetupSequenceInterface_H
24#define __mlDcmDRTPatientSetupSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTPatientSetupSequenceInterface.h" //DRTPatientSetupSequence
31#include "mlDcmDRTFixationDeviceSequenceInterface.h" //DRTFixationDeviceSequence
32#include "mlDcmDRTMotionSynchronizationSequenceInterface.h" //DRTMotionSynchronizationSequence
33#include "mlDcmDRTReferencedSetupImageSequenceInterface.h" //DRTReferencedSetupImageSequence
34#include "mlDcmDRTSetupDeviceSequenceInterface.h" //DRTSetupDeviceSequence
35#include "mlDcmDRTShieldingDeviceSequenceInterface.h" //DRTShieldingDeviceSequence
36
37
38// ML includes
39#ifndef __mlModuleIncludes_H
40#include "mlModuleIncludes.h"
41#endif
42
44
45// ------------------------------------------------------------------
47// ------------------------------------------------------------------
49{
50 public:
51
53 {
54 public:
55
56 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
57
59
60 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
61
62 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
63
64 virtual ~Item() {}
65
66 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
67
68 bool isValid() const { return _dcmItem.get() != nullptr; }
69
70
71 // PatientAdditionalPosition (300a,0184) vr=LO, vm=1, type=1C
72 bool getPatientAdditionalPosition(std::string& parameter) const;
73 std::string getPatientAdditionalPositionTag() const { return "(300a,0184)"; }
74 bool setPatientAdditionalPosition(std::string parameter);
75
76 // PatientPosition (0018,5100) vr=CS, vm=1, type=1C
77 bool getPatientPosition(std::string& parameter) const;
78 std::string getPatientPositionTag() const { return "(0018,5100)"; }
79 bool setPatientPosition(std::string parameter);
80
81 // PatientSetupLabel (300a,0183) vr=LO, vm=1, type=3
82 bool getPatientSetupLabel(std::string& parameter) const;
83 std::string getPatientSetupLabelTag() const { return "(300a,0183)"; }
84 bool setPatientSetupLabel(std::string parameter);
85
86 // PatientSetupNumber (300a,0182) vr=IS, vm=1, type=1
87 bool getPatientSetupNumber(std::string& parameter) const;
88 std::string getPatientSetupNumberTag() const { return "(300a,0182)"; }
89 bool setPatientSetupNumber(std::string parameter);
90
91 // SetupTechnique (300a,01b0) vr=CS, vm=1, type=3
92 bool getSetupTechnique(std::string& parameter) const;
93 std::string getSetupTechniqueTag() const { return "(300a,01b0)"; }
94 bool setSetupTechnique(std::string parameter);
95
96 // SetupTechniqueDescription (300a,01b2) vr=ST, vm=1, type=3
97 bool getSetupTechniqueDescription(std::string& parameter) const;
98 std::string getSetupTechniqueDescriptionTag() const { return "(300a,01b2)"; }
99 bool setSetupTechniqueDescription(std::string parameter);
100
101 // TableTopLateralSetupDisplacement (300a,01d6) vr=DS, vm=1, type=3
102 bool getTableTopLateralSetupDisplacement(std::string& parameter) const;
103 std::string getTableTopLateralSetupDisplacementTag() const { return "(300a,01d6)"; }
104 bool setTableTopLateralSetupDisplacement(std::string parameter);
105
106 // TableTopLongitudinalSetupDisplacement (300a,01d4) vr=DS, vm=1, type=3
107 bool getTableTopLongitudinalSetupDisplacement(std::string& parameter) const;
108 std::string getTableTopLongitudinalSetupDisplacementTag() const { return "(300a,01d4)"; }
109 bool setTableTopLongitudinalSetupDisplacement(std::string parameter);
110
111 // TableTopVerticalSetupDisplacement (300a,01d2) vr=DS, vm=1, type=3
112 bool getTableTopVerticalSetupDisplacement(std::string& parameter) const;
113 std::string getTableTopVerticalSetupDisplacementTag() const { return "(300a,01d2)"; }
114 bool setTableTopVerticalSetupDisplacement(std::string parameter);
115
116 // FixationDeviceSequence (300a,0190) vr=SQ, vm=1, type=3
118 std::string getFixationDeviceSequenceTag() const { return std::string("(300a,0190)"); }
120
121 // MotionSynchronizationSequence (300a,0410) vr=SQ, vm=1, type=3
123 std::string getMotionSynchronizationSequenceTag() const { return std::string("(300a,0410)"); }
125
126 // ReferencedSetupImageSequence (300a,0401) vr=SQ, vm=1, type=3
128 std::string getReferencedSetupImageSequenceTag() const { return std::string("(300a,0401)"); }
130
131 // SetupDeviceSequence (300a,01b4) vr=SQ, vm=1, type=3
133 std::string getSetupDeviceSequenceTag() const { return std::string("(300a,01b4)"); }
135
136 // ShieldingDeviceSequence (300a,01a0) vr=SQ, vm=1, type=3
138 std::string getShieldingDeviceSequenceTag() const { return std::string("(300a,01a0)"); }
140
141
142 private:
143
144 DCMTree::TreePtr _dcmItem;
145
146 };
147
149
151 DcmDRTPatientSetupSequenceInterface(std::vector<DcmDRTPatientSetupSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
152
159
162 // PatientAdditionalPosition (300a,0184) vr=LO, vm=1, type=1C
163 bool getPatientAdditionalPosition(unsigned long idx, std::string& parameter) const;
164 bool getPatientAdditionalPosition(DCMTree::TreePtr item, std::string& parameter) const;
165 std::string getPatientAdditionalPositionTag() const { return "(300a,0184)"; }
166 bool setPatientAdditionalPosition(unsigned long idx, std::string parameter);
167
168 // PatientPosition (0018,5100) vr=CS, vm=1, type=1C
169 bool getPatientPosition(unsigned long idx, std::string& parameter) const;
170 bool getPatientPosition(DCMTree::TreePtr item, std::string& parameter) const;
171 std::string getPatientPositionTag() const { return "(0018,5100)"; }
172 bool setPatientPosition(unsigned long idx, std::string parameter);
173
174 // PatientSetupLabel (300a,0183) vr=LO, vm=1, type=3
175 bool getPatientSetupLabel(unsigned long idx, std::string& parameter) const;
176 bool getPatientSetupLabel(DCMTree::TreePtr item, std::string& parameter) const;
177 std::string getPatientSetupLabelTag() const { return "(300a,0183)"; }
178 bool setPatientSetupLabel(unsigned long idx, std::string parameter);
179
180 // PatientSetupNumber (300a,0182) vr=IS, vm=1, type=1
181 bool getPatientSetupNumber(unsigned long idx, std::string& parameter) const;
182 bool getPatientSetupNumber(DCMTree::TreePtr item, std::string& parameter) const;
183 std::string getPatientSetupNumberTag() const { return "(300a,0182)"; }
184 bool setPatientSetupNumber(unsigned long idx, std::string parameter);
185
186 // SetupTechnique (300a,01b0) vr=CS, vm=1, type=3
187 bool getSetupTechnique(unsigned long idx, std::string& parameter) const;
188 bool getSetupTechnique(DCMTree::TreePtr item, std::string& parameter) const;
189 std::string getSetupTechniqueTag() const { return "(300a,01b0)"; }
190 bool setSetupTechnique(unsigned long idx, std::string parameter);
191
192 // SetupTechniqueDescription (300a,01b2) vr=ST, vm=1, type=3
193 bool getSetupTechniqueDescription(unsigned long idx, std::string& parameter) const;
194 bool getSetupTechniqueDescription(DCMTree::TreePtr item, std::string& parameter) const;
195 std::string getSetupTechniqueDescriptionTag() const { return "(300a,01b2)"; }
196 bool setSetupTechniqueDescription(unsigned long idx, std::string parameter);
197
198 // TableTopLateralSetupDisplacement (300a,01d6) vr=DS, vm=1, type=3
199 bool getTableTopLateralSetupDisplacement(unsigned long idx, std::string& parameter) const;
200 bool getTableTopLateralSetupDisplacement(DCMTree::TreePtr item, std::string& parameter) const;
201 std::string getTableTopLateralSetupDisplacementTag() const { return "(300a,01d6)"; }
202 bool setTableTopLateralSetupDisplacement(unsigned long idx, std::string parameter);
203
204 // TableTopLongitudinalSetupDisplacement (300a,01d4) vr=DS, vm=1, type=3
205 bool getTableTopLongitudinalSetupDisplacement(unsigned long idx, std::string& parameter) const;
207 std::string getTableTopLongitudinalSetupDisplacementTag() const { return "(300a,01d4)"; }
208 bool setTableTopLongitudinalSetupDisplacement(unsigned long idx, std::string parameter);
209
210 // TableTopVerticalSetupDisplacement (300a,01d2) vr=DS, vm=1, type=3
211 bool getTableTopVerticalSetupDisplacement(unsigned long idx, std::string& parameter) const;
212 bool getTableTopVerticalSetupDisplacement(DCMTree::TreePtr item, std::string& parameter) const;
213 std::string getTableTopVerticalSetupDisplacementTag() const { return "(300a,01d2)"; }
214 bool setTableTopVerticalSetupDisplacement(unsigned long idx, std::string parameter);
215
216 // FixationDeviceSequence (300a,0190) vr=SQ, vm=1, type=3
218 std::string getFixationDeviceSequenceTag() const { return std::string("(300a,0190)"); }
220
221 // MotionSynchronizationSequence (300a,0410) vr=SQ, vm=1, type=3
223 std::string getMotionSynchronizationSequenceTag() const { return std::string("(300a,0410)"); }
225
226 // ReferencedSetupImageSequence (300a,0401) vr=SQ, vm=1, type=3
228 std::string getReferencedSetupImageSequenceTag() const { return std::string("(300a,0401)"); }
230
231 // SetupDeviceSequence (300a,01b4) vr=SQ, vm=1, type=3
233 std::string getSetupDeviceSequenceTag() const { return std::string("(300a,01b4)"); }
235
236 // ShieldingDeviceSequence (300a,01a0) vr=SQ, vm=1, type=3
238 std::string getShieldingDeviceSequenceTag() const { return std::string("(300a,01a0)"); }
240
241
244 void setSequence(std::vector<DcmDRTPatientSetupSequenceInterface::Item> dcmSequence) {
245 _itemVec = dcmSequence;
246 }
247
250 std::vector<DcmDRTPatientSetupSequenceInterface::Item> getSequence() const {
251 return _itemVec;
252 }
253
256 bool hasSequence() const {
257 return (_itemVec.size() != 0);
258 }
259
263 return static_cast<MLint>(_itemVec.size());
264 }
265
269 if (_itemVec.size() > idx) {
270 return _itemVec[idx];
271 }
273 }
274
278 _itemVec.push_back(DcmDRTPatientSetupSequenceInterface::Item());
279 return _itemVec[_itemVec.size()-1];
280 }
281
283 _itemVec.push_back(newItem);
284 }
285
288 bool insertItem(const size_t idx) {
289 if (_itemVec.size() > idx) {
290 std::vector<DcmDRTPatientSetupSequenceInterface::Item>::iterator it = _itemVec.begin();
291 std::advance(it, idx);
293 return true;
294 }
295 return false;
296 }
297
300 bool removeItem(const size_t idx) {
301 if ( _itemVec.size() > idx ) {
302 std::vector<DcmDRTPatientSetupSequenceInterface::Item>::iterator it = _itemVec.begin();
303 std::advance(it, idx);
304 _itemVec.erase(it);
305 return true;
306 }
307 return false;
308 }
309
310 protected:
312 std::vector<DcmDRTPatientSetupSequenceInterface::Item> _itemVec;
313};
314
316
317#endif // __mlDcmDRTPatientSetupSequenceInterface_H
318
319/* MeVis-Hidden-Components-Start */
320/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTFixationDeviceSequence.
Class to provide access to DRTMotionSynchronizationSequence.
bool getPatientPosition(std::string &parameter) const
bool getPatientAdditionalPosition(std::string &parameter) const
bool getSetupTechnique(std::string &parameter) const
bool setPatientSetupLabel(std::string parameter)
bool getPatientSetupLabel(std::string &parameter) const
void setSetupDeviceSequence(DcmDRTSetupDeviceSequenceInterface seq)
bool setPatientAdditionalPosition(std::string parameter)
bool getTableTopLongitudinalSetupDisplacement(std::string &parameter) const
bool setSetupTechnique(std::string parameter)
DcmDRTSetupDeviceSequenceInterface getSetupDeviceSequence() const
void setFixationDeviceSequence(DcmDRTFixationDeviceSequenceInterface seq)
bool setPatientPosition(std::string parameter)
void setShieldingDeviceSequence(DcmDRTShieldingDeviceSequenceInterface seq)
bool getPatientSetupNumber(std::string &parameter) const
DcmDRTMotionSynchronizationSequenceInterface getMotionSynchronizationSequence() const
void setReferencedSetupImageSequence(DcmDRTReferencedSetupImageSequenceInterface seq)
bool getSetupTechniqueDescription(std::string &parameter) const
DcmDRTReferencedSetupImageSequenceInterface getReferencedSetupImageSequence() const
bool setTableTopLateralSetupDisplacement(std::string parameter)
bool setSetupTechniqueDescription(std::string parameter)
DcmDRTShieldingDeviceSequenceInterface getShieldingDeviceSequence() const
bool setTableTopLongitudinalSetupDisplacement(std::string parameter)
bool setPatientSetupNumber(std::string parameter)
bool getTableTopVerticalSetupDisplacement(std::string &parameter) const
bool setTableTopVerticalSetupDisplacement(std::string parameter)
bool getTableTopLateralSetupDisplacement(std::string &parameter) const
DcmDRTFixationDeviceSequenceInterface getFixationDeviceSequence() const
void setMotionSynchronizationSequence(DcmDRTMotionSynchronizationSequenceInterface seq)
Class to provide access to DRTPatientSetupSequence.
bool getSetupTechniqueDescription(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTPatientSetupSequenceInterface::Item newItem)
std::vector< DcmDRTPatientSetupSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
DcmDRTFixationDeviceSequenceInterface getFixationDeviceSequence(unsigned long idx) const
bool getPatientAdditionalPosition(DCMTree::TreePtr item, std::string &parameter) const
virtual ~DcmDRTPatientSetupSequenceInterface()
Default virtual Destructor.
bool hasSequence() const
Check if the DRTPatientSetupSequence is set.
DcmDRTPatientSetupSequenceInterface(std::vector< DcmDRTPatientSetupSequenceInterface::Item > dcmSequence)
Default Constructor.
void setSetupDeviceSequence(DcmDRTSetupDeviceSequenceInterface seq, unsigned long idx)
DcmDRTReferencedSetupImageSequenceInterface getReferencedSetupImageSequence(unsigned long idx) const
DcmDRTPatientSetupSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getPatientPosition(DCMTree::TreePtr item, std::string &parameter) const
bool getPatientSetupNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getTableTopLongitudinalSetupDisplacement(DCMTree::TreePtr item, std::string &parameter) const
bool setPatientSetupNumber(unsigned long idx, std::string parameter)
void setFixationDeviceSequence(DcmDRTFixationDeviceSequenceInterface seq, unsigned long idx)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setTableTopLongitudinalSetupDisplacement(unsigned long idx, std::string parameter)
bool setSetupTechniqueDescription(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTPatientSetupSequenceInterface::Item > dcmSequence)
Set the DRTPatientSetupSequence this interface class provides access to.
bool setPatientPosition(unsigned long idx, std::string parameter)
bool getPatientSetupLabel(unsigned long idx, std::string &parameter) const
DcmDRTPatientSetupSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool setSetupTechnique(unsigned long idx, std::string parameter)
bool getTableTopLateralSetupDisplacement(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getPatientSetupNumber(unsigned long idx, std::string &parameter) const
void setMotionSynchronizationSequence(DcmDRTMotionSynchronizationSequenceInterface seq, unsigned long idx)
bool getTableTopVerticalSetupDisplacement(DCMTree::TreePtr item, std::string &parameter) const
void setShieldingDeviceSequence(DcmDRTShieldingDeviceSequenceInterface seq, unsigned long idx)
bool setPatientSetupLabel(unsigned long idx, std::string parameter)
void setReferencedSetupImageSequence(DcmDRTReferencedSetupImageSequenceInterface seq, unsigned long idx)
DcmDRTShieldingDeviceSequenceInterface getShieldingDeviceSequence(unsigned long idx) const
bool getPatientAdditionalPosition(unsigned long idx, std::string &parameter) const
DcmDRTPatientSetupSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getTableTopVerticalSetupDisplacement(unsigned long idx, std::string &parameter) const
bool getSetupTechnique(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTSetupDeviceSequenceInterface getSetupDeviceSequence(unsigned long idx) const
bool getPatientPosition(unsigned long idx, std::string &parameter) const
bool getSetupTechniqueDescription(unsigned long idx, std::string &parameter) const
DcmDRTMotionSynchronizationSequenceInterface getMotionSynchronizationSequence(unsigned long idx) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getTableTopLongitudinalSetupDisplacement(unsigned long idx, std::string &parameter) const
bool setTableTopVerticalSetupDisplacement(unsigned long idx, std::string parameter)
bool setTableTopLateralSetupDisplacement(unsigned long idx, std::string parameter)
bool getSetupTechnique(unsigned long idx, std::string &parameter) const
bool setPatientAdditionalPosition(unsigned long idx, std::string parameter)
std::vector< DcmDRTPatientSetupSequenceInterface::Item > getSequence() const
Return the DRTPatientSetupSequence this interface class provides access to.
bool getTableTopLateralSetupDisplacement(DCMTree::TreePtr item, std::string &parameter) const
bool getPatientSetupLabel(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTReferencedSetupImageSequence.
Class to provide access to DRTSetupDeviceSequence.
Class to provide access to DRTShieldingDeviceSequence.
Class to provide access to DRTFixationDeviceSequence.
Class to provide access to DRTMotionSynchronizationSequence.
Class to provide access to DRTReferencedSetupImageSequence.
Class to provide access to DRTSetupDeviceSequence.
Class to provide access to DRTShieldingDeviceSequence.
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