MeVisLab Toolbox Reference
mlDcmDRTContributingEquipmentSequenceInterface.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 __mlDcmDRTContributingEquipmentSequenceInterface_H
24#define __mlDcmDRTContributingEquipmentSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTContributingEquipmentSequenceInterface.h" //DRTContributingEquipmentSequence
31#include "mlDcmDRTPurposeOfReferenceCodeSequenceInterface.h" //DRTPurposeOfReferenceCodeSequence
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 // ContributionDateTime (0018,a002) vr=DT, vm=1, type=3
68 bool getContributionDateTime(std::string& parameter) const;
69 std::string getContributionDateTimeTag() const { return "(0018,a002)"; }
70 bool setContributionDateTime(std::string parameter);
71
72 // ContributionDescription (0018,a003) vr=ST, vm=1, type=3
73 bool getContributionDescription(std::string& parameter) const;
74 std::string getContributionDescriptionTag() const { return "(0018,a003)"; }
75 bool setContributionDescription(std::string parameter);
76
77 // DateOfLastCalibration (0018,1200) vr=DA, vm=1-n, type=3
78 bool getDateOfLastCalibration(std::string& parameter) const;
79 std::string getDateOfLastCalibrationTag() const { return "(0018,1200)"; }
80 bool setDateOfLastCalibration(std::string parameter);
81
82 // DeviceSerialNumber (0018,1000) vr=LO, vm=1, type=3
83 bool getDeviceSerialNumber(std::string& parameter) const;
84 std::string getDeviceSerialNumberTag() const { return "(0018,1000)"; }
85 bool setDeviceSerialNumber(std::string parameter);
86
87 // InstitutionAddress (0008,0081) vr=ST, vm=1, type=3
88 bool getInstitutionAddress(std::string& parameter) const;
89 std::string getInstitutionAddressTag() const { return "(0008,0081)"; }
90 bool setInstitutionAddress(std::string parameter);
91
92 // InstitutionName (0008,0080) vr=LO, vm=1, type=3
93 bool getInstitutionName(std::string& parameter) const;
94 std::string getInstitutionNameTag() const { return "(0008,0080)"; }
95 bool setInstitutionName(std::string parameter);
96
97 // InstitutionalDepartmentName (0008,1040) vr=LO, vm=1, type=3
98 bool getInstitutionalDepartmentName(std::string& parameter) const;
99 std::string getInstitutionalDepartmentNameTag() const { return "(0008,1040)"; }
100 bool setInstitutionalDepartmentName(std::string parameter);
101
102 // Manufacturer (0008,0070) vr=LO, vm=1, type=1
103 bool getManufacturer(std::string& parameter) const;
104 std::string getManufacturerTag() const { return "(0008,0070)"; }
105 bool setManufacturer(std::string parameter);
106
107 // ManufacturerModelName (0008,1090) vr=LO, vm=1, type=3
108 bool getManufacturerModelName(std::string& parameter) const;
109 std::string getManufacturerModelNameTag() const { return "(0008,1090)"; }
110 bool setManufacturerModelName(std::string parameter);
111
112 // SoftwareVersions (0018,1020) vr=LO, vm=1-n, type=3
113 bool getSoftwareVersions(std::string& parameter) const;
114 std::string getSoftwareVersionsTag() const { return "(0018,1020)"; }
115 bool setSoftwareVersions(std::string parameter);
116
117 // SpatialResolution (0018,1050) vr=DS, vm=1, type=3
118 bool getSpatialResolution(std::string& parameter) const;
119 std::string getSpatialResolutionTag() const { return "(0018,1050)"; }
120 bool setSpatialResolution(std::string parameter);
121
122 // StationName (0008,1010) vr=SH, vm=1, type=3
123 bool getStationName(std::string& parameter) const;
124 std::string getStationNameTag() const { return "(0008,1010)"; }
125 bool setStationName(std::string parameter);
126
127 // TimeOfLastCalibration (0018,1201) vr=TM, vm=1-n, type=3
128 bool getTimeOfLastCalibration(std::string& parameter) const;
129 std::string getTimeOfLastCalibrationTag() const { return "(0018,1201)"; }
130 bool setTimeOfLastCalibration(std::string parameter);
131
132 // PurposeOfReferenceCodeSequence (0040,a170) vr=SQ, vm=1, type=1
134 std::string getPurposeOfReferenceCodeSequenceTag() const { return std::string("(0040,a170)"); }
136
137
138 private:
139
140 DCMTree::TreePtr _dcmItem;
141
142 };
143
145
147 DcmDRTContributingEquipmentSequenceInterface(std::vector<DcmDRTContributingEquipmentSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
148
155
158 // ContributionDateTime (0018,a002) vr=DT, vm=1, type=3
159 bool getContributionDateTime(unsigned long idx, std::string& parameter) const;
160 bool getContributionDateTime(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getContributionDateTimeTag() const { return "(0018,a002)"; }
162 bool setContributionDateTime(unsigned long idx, std::string parameter);
163
164 // ContributionDescription (0018,a003) vr=ST, vm=1, type=3
165 bool getContributionDescription(unsigned long idx, std::string& parameter) const;
166 bool getContributionDescription(DCMTree::TreePtr item, std::string& parameter) const;
167 std::string getContributionDescriptionTag() const { return "(0018,a003)"; }
168 bool setContributionDescription(unsigned long idx, std::string parameter);
169
170 // DateOfLastCalibration (0018,1200) vr=DA, vm=1-n, type=3
171 bool getDateOfLastCalibration(unsigned long idx, std::string& parameter) const;
172 bool getDateOfLastCalibration(DCMTree::TreePtr item, std::string& parameter) const;
173 std::string getDateOfLastCalibrationTag() const { return "(0018,1200)"; }
174 bool setDateOfLastCalibration(unsigned long idx, std::string parameter);
175
176 // DeviceSerialNumber (0018,1000) vr=LO, vm=1, type=3
177 bool getDeviceSerialNumber(unsigned long idx, std::string& parameter) const;
178 bool getDeviceSerialNumber(DCMTree::TreePtr item, std::string& parameter) const;
179 std::string getDeviceSerialNumberTag() const { return "(0018,1000)"; }
180 bool setDeviceSerialNumber(unsigned long idx, std::string parameter);
181
182 // InstitutionAddress (0008,0081) vr=ST, vm=1, type=3
183 bool getInstitutionAddress(unsigned long idx, std::string& parameter) const;
184 bool getInstitutionAddress(DCMTree::TreePtr item, std::string& parameter) const;
185 std::string getInstitutionAddressTag() const { return "(0008,0081)"; }
186 bool setInstitutionAddress(unsigned long idx, std::string parameter);
187
188 // InstitutionName (0008,0080) vr=LO, vm=1, type=3
189 bool getInstitutionName(unsigned long idx, std::string& parameter) const;
190 bool getInstitutionName(DCMTree::TreePtr item, std::string& parameter) const;
191 std::string getInstitutionNameTag() const { return "(0008,0080)"; }
192 bool setInstitutionName(unsigned long idx, std::string parameter);
193
194 // InstitutionalDepartmentName (0008,1040) vr=LO, vm=1, type=3
195 bool getInstitutionalDepartmentName(unsigned long idx, std::string& parameter) const;
196 bool getInstitutionalDepartmentName(DCMTree::TreePtr item, std::string& parameter) const;
197 std::string getInstitutionalDepartmentNameTag() const { return "(0008,1040)"; }
198 bool setInstitutionalDepartmentName(unsigned long idx, std::string parameter);
199
200 // Manufacturer (0008,0070) vr=LO, vm=1, type=1
201 bool getManufacturer(unsigned long idx, std::string& parameter) const;
202 bool getManufacturer(DCMTree::TreePtr item, std::string& parameter) const;
203 std::string getManufacturerTag() const { return "(0008,0070)"; }
204 bool setManufacturer(unsigned long idx, std::string parameter);
205
206 // ManufacturerModelName (0008,1090) vr=LO, vm=1, type=3
207 bool getManufacturerModelName(unsigned long idx, std::string& parameter) const;
208 bool getManufacturerModelName(DCMTree::TreePtr item, std::string& parameter) const;
209 std::string getManufacturerModelNameTag() const { return "(0008,1090)"; }
210 bool setManufacturerModelName(unsigned long idx, std::string parameter);
211
212 // SoftwareVersions (0018,1020) vr=LO, vm=1-n, type=3
213 bool getSoftwareVersions(unsigned long idx, std::string& parameter) const;
214 bool getSoftwareVersions(DCMTree::TreePtr item, std::string& parameter) const;
215 std::string getSoftwareVersionsTag() const { return "(0018,1020)"; }
216 bool setSoftwareVersions(unsigned long idx, std::string parameter);
217
218 // SpatialResolution (0018,1050) vr=DS, vm=1, type=3
219 bool getSpatialResolution(unsigned long idx, std::string& parameter) const;
220 bool getSpatialResolution(DCMTree::TreePtr item, std::string& parameter) const;
221 std::string getSpatialResolutionTag() const { return "(0018,1050)"; }
222 bool setSpatialResolution(unsigned long idx, std::string parameter);
223
224 // StationName (0008,1010) vr=SH, vm=1, type=3
225 bool getStationName(unsigned long idx, std::string& parameter) const;
226 bool getStationName(DCMTree::TreePtr item, std::string& parameter) const;
227 std::string getStationNameTag() const { return "(0008,1010)"; }
228 bool setStationName(unsigned long idx, std::string parameter);
229
230 // TimeOfLastCalibration (0018,1201) vr=TM, vm=1-n, type=3
231 bool getTimeOfLastCalibration(unsigned long idx, std::string& parameter) const;
232 bool getTimeOfLastCalibration(DCMTree::TreePtr item, std::string& parameter) const;
233 std::string getTimeOfLastCalibrationTag() const { return "(0018,1201)"; }
234 bool setTimeOfLastCalibration(unsigned long idx, std::string parameter);
235
236 // PurposeOfReferenceCodeSequence (0040,a170) vr=SQ, vm=1, type=1
238 std::string getPurposeOfReferenceCodeSequenceTag() const { return std::string("(0040,a170)"); }
240
241
244 void setSequence(std::vector<DcmDRTContributingEquipmentSequenceInterface::Item> dcmSequence) {
245 _itemVec = dcmSequence;
246 }
247
250 std::vector<DcmDRTContributingEquipmentSequenceInterface::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
279 return _itemVec[_itemVec.size()-1];
280 }
281
285
288 bool insertItem(const size_t idx) {
289 if (_itemVec.size() > idx) {
290 std::vector<DcmDRTContributingEquipmentSequenceInterface::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<DcmDRTContributingEquipmentSequenceInterface::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<DcmDRTContributingEquipmentSequenceInterface::Item> _itemVec;
313};
314
316
317#endif // __mlDcmDRTContributingEquipmentSequenceInterface_H
318
319/* MeVis-Hidden-Components-Start */
320/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getContributionDateTime(std::string &parameter) const
bool getInstitutionName(std::string &parameter) const
bool getInstitutionAddress(std::string &parameter) const
bool getManufacturerModelName(std::string &parameter) const
DcmDRTPurposeOfReferenceCodeSequenceInterface getPurposeOfReferenceCodeSequence() const
bool setInstitutionalDepartmentName(std::string parameter)
bool getStationName(std::string &parameter) const
bool getManufacturer(std::string &parameter) const
bool getSpatialResolution(std::string &parameter) const
bool getContributionDescription(std::string &parameter) const
bool getInstitutionalDepartmentName(std::string &parameter) const
bool getDateOfLastCalibration(std::string &parameter) const
bool getTimeOfLastCalibration(std::string &parameter) const
bool getSoftwareVersions(std::string &parameter) const
void setPurposeOfReferenceCodeSequence(DcmDRTPurposeOfReferenceCodeSequenceInterface seq)
bool getDeviceSerialNumber(std::string &parameter) const
Class to provide access to DRTContributingEquipmentSequence.
bool getInstitutionName(DCMTree::TreePtr item, std::string &parameter) const
bool setManufacturerModelName(unsigned long idx, std::string parameter)
bool getSpatialResolution(unsigned long idx, std::string &parameter) const
bool getInstitutionAddress(DCMTree::TreePtr item, std::string &parameter) const
bool setInstitutionName(unsigned long idx, std::string parameter)
bool getManufacturer(unsigned long idx, std::string &parameter) const
bool getSoftwareVersions(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTContributingEquipmentSequenceInterface::Item > dcmSequence)
Set the DRTContributingEquipmentSequence this interface class provides access to.
std::vector< DcmDRTContributingEquipmentSequenceInterface::Item > getSequence() const
Return the DRTContributingEquipmentSequence this interface class provides access to.
DcmDRTContributingEquipmentSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getTimeOfLastCalibration(unsigned long idx, std::string &parameter) const
bool getTimeOfLastCalibration(DCMTree::TreePtr item, std::string &parameter) const
bool getInstitutionalDepartmentName(unsigned long idx, std::string &parameter) const
DcmDRTPurposeOfReferenceCodeSequenceInterface getPurposeOfReferenceCodeSequence(unsigned long idx) const
bool setTimeOfLastCalibration(unsigned long idx, std::string parameter)
bool getDateOfLastCalibration(DCMTree::TreePtr item, std::string &parameter) const
bool getStationName(DCMTree::TreePtr item, std::string &parameter) const
bool setSoftwareVersions(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTContributingEquipmentSequence is set.
bool setDeviceSerialNumber(unsigned long idx, std::string parameter)
bool setSpatialResolution(unsigned long idx, std::string parameter)
bool getManufacturer(DCMTree::TreePtr item, std::string &parameter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setInstitutionAddress(unsigned long idx, std::string parameter)
bool getContributionDateTime(unsigned long idx, std::string &parameter) const
bool getInstitutionAddress(unsigned long idx, std::string &parameter) const
bool getInstitutionName(unsigned long idx, std::string &parameter) const
bool getManufacturerModelName(unsigned long idx, std::string &parameter) const
bool setContributionDescription(unsigned long idx, std::string parameter)
bool getContributionDescription(unsigned long idx, std::string &parameter) const
bool setInstitutionalDepartmentName(unsigned long idx, std::string parameter)
bool getStationName(unsigned long idx, std::string &parameter) const
bool getDeviceSerialNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setContributionDateTime(unsigned long idx, std::string parameter)
bool getManufacturerModelName(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTContributingEquipmentSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getContributionDateTime(DCMTree::TreePtr item, std::string &parameter) const
bool getSpatialResolution(DCMTree::TreePtr item, std::string &parameter) const
bool getDeviceSerialNumber(unsigned long idx, std::string &parameter) const
bool setDateOfLastCalibration(unsigned long idx, std::string parameter)
DcmDRTContributingEquipmentSequenceInterface::Item & addItem()
Adds a new item to the sequence.
void setPurposeOfReferenceCodeSequence(DcmDRTPurposeOfReferenceCodeSequenceInterface seq, unsigned long idx)
void addItem(DcmDRTContributingEquipmentSequenceInterface::Item newItem)
bool setManufacturer(unsigned long idx, std::string parameter)
DcmDRTContributingEquipmentSequenceInterface(std::vector< DcmDRTContributingEquipmentSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getContributionDescription(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getSoftwareVersions(DCMTree::TreePtr item, std::string &parameter) const
bool getDateOfLastCalibration(unsigned long idx, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setStationName(unsigned long idx, std::string parameter)
bool getInstitutionalDepartmentName(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTPurposeOfReferenceCodeSequence.
Class to provide access to DRTPurposeOfReferenceCodeSequence.
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