MeVisLab Toolbox Reference
mlDcmDRTExposureSequenceInterface.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 __mlDcmDRTExposureSequenceInterface_H
24#define __mlDcmDRTExposureSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTExposureSequenceInterface.h" //DRTExposureSequence
31#include "mlDcmDRTApplicatorSequenceInRTImageModuleInterface.h" //DRTApplicatorSequenceInRTImageModule
32#include "mlDcmDRTBeamLimitingDeviceSequenceInRTImageModuleInterface.h" //DRTBeamLimitingDeviceSequenceInRTImageModule
33#include "mlDcmDRTBlockSequenceInRTImageModuleInterface.h" //DRTBlockSequenceInRTImageModule
34
35
36// ML includes
37#ifndef __mlModuleIncludes_H
38#include "mlModuleIncludes.h"
39#endif
40
42
43// ------------------------------------------------------------------
45// ------------------------------------------------------------------
47{
48 public:
49
51 {
52 public:
53
54 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
55
57
58 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
59
60 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
61
62 virtual ~Item() {}
63
64 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
65
66 bool isValid() const { return _dcmItem.get() != nullptr; }
67
68
69 // DiaphragmPosition (3002,0034) vr=DS, vm=4, type=3
70 bool getDiaphragmPosition(std::string& parameter) const;
71 std::string getDiaphragmPositionTag() const { return "(3002,0034)"; }
72 bool setDiaphragmPosition(std::string parameter);
73
74 // ExposureTime (0018,1150) vr=IS, vm=1, type=2C
75 bool getExposureTime(std::string& parameter) const;
76 std::string getExposureTimeTag() const { return "(0018,1150)"; }
77 bool setExposureTime(std::string parameter);
78
79 // FluenceDataScale (3002,0042) vr=DS, vm=1, type=3
80 bool getFluenceDataScale(std::string& parameter) const;
81 std::string getFluenceDataScaleTag() const { return "(3002,0042)"; }
82 bool setFluenceDataScale(std::string parameter);
83
84 // FluenceDataSource (3002,0041) vr=CS, vm=1, type=1
85 bool getFluenceDataSource(std::string& parameter) const;
86 std::string getFluenceDataSourceTag() const { return "(3002,0041)"; }
87 bool setFluenceDataSource(std::string parameter);
88
89 // KVP (0018,0060) vr=DS, vm=1, type=2C
90 bool getKVP(std::string& parameter) const;
91 std::string getKVPTag() const { return "(0018,0060)"; }
92 bool setKVP(std::string parameter);
93
94 // MetersetExposure (3002,0032) vr=DS, vm=1, type=2C
95 bool getMetersetExposure(std::string& parameter) const;
96 std::string getMetersetExposureTag() const { return "(3002,0032)"; }
97 bool setMetersetExposure(std::string parameter);
98
99 // NumberOfBlocks (300a,00f0) vr=IS, vm=1, type=1C
100 bool getNumberOfBlocks(std::string& parameter) const;
101 std::string getNumberOfBlocksTag() const { return "(300a,00f0)"; }
102 bool setNumberOfBlocks(std::string parameter);
103
104 // ReferencedFrameNumber (0008,1160) vr=IS, vm=1-n, type=1C
105 bool getReferencedFrameNumber(std::string& parameter) const;
106 std::string getReferencedFrameNumberTag() const { return "(0008,1160)"; }
107 bool setReferencedFrameNumber(std::string parameter);
108
109 // XRayTubeCurrent (0018,1151) vr=IS, vm=1, type=2C
110 bool getXRayTubeCurrent(std::string& parameter) const;
111 std::string getXRayTubeCurrentTag() const { return "(0018,1151)"; }
112 bool setXRayTubeCurrent(std::string parameter);
113
114 // ApplicatorSequence (300a,0107) vr=SQ, vm=1, type=3
116 std::string getApplicatorSequenceTag() const { return std::string("(300a,0107)"); }
118
119 // BeamLimitingDeviceSequence (300a,00b6) vr=SQ, vm=1, type=3
121 std::string getBeamLimitingDeviceSequenceTag() const { return std::string("(300a,00b6)"); }
123
124 // BlockSequence (300a,00f4) vr=SQ, vm=1, type=2C
126 std::string getBlockSequenceTag() const { return std::string("(300a,00f4)"); }
128
129
130 private:
131
132 DCMTree::TreePtr _dcmItem;
133
134 };
135
137
139 DcmDRTExposureSequenceInterface(std::vector<DcmDRTExposureSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
140
142 for(size_t i=0; i < treePtrSeq.size(); i++)
143 {
145 }
146 }
147
150 // DiaphragmPosition (3002,0034) vr=DS, vm=4, type=3
151 bool getDiaphragmPosition(unsigned long idx, std::string& parameter) const;
152 bool getDiaphragmPosition(DCMTree::TreePtr item, std::string& parameter) const;
153 std::string getDiaphragmPositionTag() const { return "(3002,0034)"; }
154 bool setDiaphragmPosition(unsigned long idx, std::string parameter);
155
156 // ExposureTime (0018,1150) vr=IS, vm=1, type=2C
157 bool getExposureTime(unsigned long idx, std::string& parameter) const;
158 bool getExposureTime(DCMTree::TreePtr item, std::string& parameter) const;
159 std::string getExposureTimeTag() const { return "(0018,1150)"; }
160 bool setExposureTime(unsigned long idx, std::string parameter);
161
162 // FluenceDataScale (3002,0042) vr=DS, vm=1, type=3
163 bool getFluenceDataScale(unsigned long idx, std::string& parameter) const;
164 bool getFluenceDataScale(DCMTree::TreePtr item, std::string& parameter) const;
165 std::string getFluenceDataScaleTag() const { return "(3002,0042)"; }
166 bool setFluenceDataScale(unsigned long idx, std::string parameter);
167
168 // FluenceDataSource (3002,0041) vr=CS, vm=1, type=1
169 bool getFluenceDataSource(unsigned long idx, std::string& parameter) const;
170 bool getFluenceDataSource(DCMTree::TreePtr item, std::string& parameter) const;
171 std::string getFluenceDataSourceTag() const { return "(3002,0041)"; }
172 bool setFluenceDataSource(unsigned long idx, std::string parameter);
173
174 // KVP (0018,0060) vr=DS, vm=1, type=2C
175 bool getKVP(unsigned long idx, std::string& parameter) const;
176 bool getKVP(DCMTree::TreePtr item, std::string& parameter) const;
177 std::string getKVPTag() const { return "(0018,0060)"; }
178 bool setKVP(unsigned long idx, std::string parameter);
179
180 // MetersetExposure (3002,0032) vr=DS, vm=1, type=2C
181 bool getMetersetExposure(unsigned long idx, std::string& parameter) const;
182 bool getMetersetExposure(DCMTree::TreePtr item, std::string& parameter) const;
183 std::string getMetersetExposureTag() const { return "(3002,0032)"; }
184 bool setMetersetExposure(unsigned long idx, std::string parameter);
185
186 // NumberOfBlocks (300a,00f0) vr=IS, vm=1, type=1C
187 bool getNumberOfBlocks(unsigned long idx, std::string& parameter) const;
188 bool getNumberOfBlocks(DCMTree::TreePtr item, std::string& parameter) const;
189 std::string getNumberOfBlocksTag() const { return "(300a,00f0)"; }
190 bool setNumberOfBlocks(unsigned long idx, std::string parameter);
191
192 // ReferencedFrameNumber (0008,1160) vr=IS, vm=1-n, type=1C
193 bool getReferencedFrameNumber(unsigned long idx, std::string& parameter) const;
194 bool getReferencedFrameNumber(DCMTree::TreePtr item, std::string& parameter) const;
195 std::string getReferencedFrameNumberTag() const { return "(0008,1160)"; }
196 bool setReferencedFrameNumber(unsigned long idx, std::string parameter);
197
198 // XRayTubeCurrent (0018,1151) vr=IS, vm=1, type=2C
199 bool getXRayTubeCurrent(unsigned long idx, std::string& parameter) const;
200 bool getXRayTubeCurrent(DCMTree::TreePtr item, std::string& parameter) const;
201 std::string getXRayTubeCurrentTag() const { return "(0018,1151)"; }
202 bool setXRayTubeCurrent(unsigned long idx, std::string parameter);
203
204 // ApplicatorSequence (300a,0107) vr=SQ, vm=1, type=3
206 std::string getApplicatorSequenceTag() const { return std::string("(300a,0107)"); }
208
209 // BeamLimitingDeviceSequence (300a,00b6) vr=SQ, vm=1, type=3
211 std::string getBeamLimitingDeviceSequenceTag() const { return std::string("(300a,00b6)"); }
213
214 // BlockSequence (300a,00f4) vr=SQ, vm=1, type=2C
216 std::string getBlockSequenceTag() const { return std::string("(300a,00f4)"); }
218
219
222 void setSequence(std::vector<DcmDRTExposureSequenceInterface::Item> dcmSequence) {
223 _itemVec = dcmSequence;
224 }
225
228 std::vector<DcmDRTExposureSequenceInterface::Item> getSequence() const {
229 return _itemVec;
230 }
231
234 bool hasSequence() const {
235 return (_itemVec.size() != 0);
236 }
237
241 return static_cast<MLint>(_itemVec.size());
242 }
243
247 if (_itemVec.size() > idx) {
248 return _itemVec[idx];
249 }
251 }
252
256 _itemVec.push_back(DcmDRTExposureSequenceInterface::Item());
257 return _itemVec[_itemVec.size()-1];
258 }
259
261 _itemVec.push_back(newItem);
262 }
263
266 bool insertItem(const size_t idx) {
267 if (_itemVec.size() > idx) {
268 std::vector<DcmDRTExposureSequenceInterface::Item>::iterator it = _itemVec.begin();
269 std::advance(it, idx);
270 _itemVec.insert(it, DcmDRTExposureSequenceInterface::Item());
271 return true;
272 }
273 return false;
274 }
275
278 bool removeItem(const size_t idx) {
279 if ( _itemVec.size() > idx ) {
280 std::vector<DcmDRTExposureSequenceInterface::Item>::iterator it = _itemVec.begin();
281 std::advance(it, idx);
282 _itemVec.erase(it);
283 return true;
284 }
285 return false;
286 }
287
288 protected:
290 std::vector<DcmDRTExposureSequenceInterface::Item> _itemVec;
291};
292
294
295#endif // __mlDcmDRTExposureSequenceInterface_H
296
297/* MeVis-Hidden-Components-Start */
298/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTApplicatorSequenceInRTImageModule.
Class to provide access to DRTBeamLimitingDeviceSequenceInRTImageModule.
Class to provide access to DRTBlockSequenceInRTImageModule.
bool getFluenceDataSource(std::string &parameter) const
void setBlockSequence(DcmDRTBlockSequenceInRTImageModuleInterface seq)
bool getNumberOfBlocks(std::string &parameter) const
bool getReferencedFrameNumber(std::string &parameter) const
bool getMetersetExposure(std::string &parameter) const
bool getDiaphragmPosition(std::string &parameter) const
bool setMetersetExposure(std::string parameter)
bool getXRayTubeCurrent(std::string &parameter) const
bool setKVP(std::string parameter)
void setApplicatorSequence(DcmDRTApplicatorSequenceInRTImageModuleInterface seq)
bool getKVP(std::string &parameter) const
bool setDiaphragmPosition(std::string parameter)
DcmDRTApplicatorSequenceInRTImageModuleInterface getApplicatorSequence() const
bool setNumberOfBlocks(std::string parameter)
bool setFluenceDataScale(std::string parameter)
bool setReferencedFrameNumber(std::string parameter)
void setBeamLimitingDeviceSequence(DcmDRTBeamLimitingDeviceSequenceInRTImageModuleInterface seq)
DcmDRTBlockSequenceInRTImageModuleInterface getBlockSequence() const
bool setFluenceDataSource(std::string parameter)
DcmDRTBeamLimitingDeviceSequenceInRTImageModuleInterface getBeamLimitingDeviceSequence() const
bool setXRayTubeCurrent(std::string parameter)
bool setExposureTime(std::string parameter)
bool getFluenceDataScale(std::string &parameter) const
bool getExposureTime(std::string &parameter) const
Class to provide access to DRTExposureSequence.
bool getDiaphragmPosition(DCMTree::TreePtr item, std::string &parameter) const
bool getXRayTubeCurrent(unsigned long idx, std::string &parameter) const
bool setXRayTubeCurrent(unsigned long idx, std::string parameter)
std::vector< DcmDRTExposureSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setMetersetExposure(unsigned long idx, std::string parameter)
std::vector< DcmDRTExposureSequenceInterface::Item > getSequence() const
Return the DRTExposureSequence this interface class provides access to.
bool getFluenceDataSource(unsigned long idx, std::string &parameter) const
DcmDRTExposureSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getXRayTubeCurrent(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTExposureSequenceInterface(std::vector< DcmDRTExposureSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getDiaphragmPosition(unsigned long idx, std::string &parameter) const
bool getKVP(DCMTree::TreePtr item, std::string &parameter) const
bool getFluenceDataScale(DCMTree::TreePtr item, std::string &parameter) const
bool getKVP(unsigned long idx, std::string &parameter) const
DcmDRTApplicatorSequenceInRTImageModuleInterface getApplicatorSequence(unsigned long idx) const
bool setDiaphragmPosition(unsigned long idx, std::string parameter)
DcmDRTBeamLimitingDeviceSequenceInRTImageModuleInterface getBeamLimitingDeviceSequence(unsigned long idx) const
void addItem(DcmDRTExposureSequenceInterface::Item newItem)
virtual ~DcmDRTExposureSequenceInterface()
Default virtual Destructor.
bool setExposureTime(unsigned long idx, std::string parameter)
bool setNumberOfBlocks(unsigned long idx, std::string parameter)
DcmDRTExposureSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getReferencedFrameNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setFluenceDataScale(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getReferencedFrameNumber(unsigned long idx, std::string &parameter) const
void setBeamLimitingDeviceSequence(DcmDRTBeamLimitingDeviceSequenceInRTImageModuleInterface seq, unsigned long idx)
DcmDRTExposureSequenceInterface::Item & addItem()
Adds a new item to the sequence.
void setSequence(std::vector< DcmDRTExposureSequenceInterface::Item > dcmSequence)
Set the DRTExposureSequence this interface class provides access to.
bool getNumberOfBlocks(unsigned long idx, std::string &parameter) const
DcmDRTBlockSequenceInRTImageModuleInterface getBlockSequence(unsigned long idx) const
bool setFluenceDataSource(unsigned long idx, std::string parameter)
bool getExposureTime(unsigned long idx, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
void setApplicatorSequence(DcmDRTApplicatorSequenceInRTImageModuleInterface seq, unsigned long idx)
bool getMetersetExposure(DCMTree::TreePtr item, std::string &parameter) const
bool setReferencedFrameNumber(unsigned long idx, std::string parameter)
bool getMetersetExposure(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getNumberOfBlocks(DCMTree::TreePtr item, std::string &parameter) const
bool hasSequence() const
Check if the DRTExposureSequence is set.
bool getFluenceDataSource(DCMTree::TreePtr item, std::string &parameter) const
bool getFluenceDataScale(unsigned long idx, std::string &parameter) const
bool setKVP(unsigned long idx, std::string parameter)
void setBlockSequence(DcmDRTBlockSequenceInRTImageModuleInterface seq, unsigned long idx)
bool getExposureTime(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTApplicatorSequenceInRTImageModule.
Class to provide access to DRTBeamLimitingDeviceSequenceInRTImageModule.
Class to provide access to DRTBlockSequenceInRTImageModule.
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