MeVisLab Toolbox Reference
mlDcmDRTRequestAttributesSequenceInterface.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 __mlDcmDRTRequestAttributesSequenceInterface_H
24#define __mlDcmDRTRequestAttributesSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTRequestAttributesSequenceInterface.h" //DRTRequestAttributesSequence
31#include "mlDcmDRTReasonForRequestedProcedureCodeSequenceInterface.h" //DRTReasonForRequestedProcedureCodeSequence
32#include "mlDcmDRTReferencedStudySequenceInterface.h" //DRTReferencedStudySequence
33#include "mlDcmDRTRequestedProcedureCodeSequenceInterface.h" //DRTRequestedProcedureCodeSequence
34#include "mlDcmDRTScheduledProtocolCodeSequenceInterface.h" //DRTScheduledProtocolCodeSequence
35
36
37// ML includes
38#ifndef __mlModuleIncludes_H
39#include "mlModuleIncludes.h"
40#endif
41
43
44// ------------------------------------------------------------------
46// ------------------------------------------------------------------
48{
49 public:
50
52 {
53 public:
54
55 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
56
58
59 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
60
61 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
62
63 virtual ~Item() {}
64
65 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
66
67 bool isValid() const { return _dcmItem.get() != nullptr; }
68
69
70 // AccessionNumber (0008,0050) vr=SH, vm=1, type=3
71 bool getAccessionNumber(std::string& parameter) const;
72 std::string getAccessionNumberTag() const { return "(0008,0050)"; }
73 bool setAccessionNumber(std::string parameter);
74
75 // ReasonForTheRequestedProcedure (0040,1002) vr=LO, vm=1, type=3
76 bool getReasonForTheRequestedProcedure(std::string& parameter) const;
77 std::string getReasonForTheRequestedProcedureTag() const { return "(0040,1002)"; }
78 bool setReasonForTheRequestedProcedure(std::string parameter);
79
80 // RequestedProcedureDescription (0032,1060) vr=LO, vm=1, type=3
81 bool getRequestedProcedureDescription(std::string& parameter) const;
82 std::string getRequestedProcedureDescriptionTag() const { return "(0032,1060)"; }
83 bool setRequestedProcedureDescription(std::string parameter);
84
85 // RequestedProcedureID (0040,1001) vr=SH, vm=1, type=1
86 bool getRequestedProcedureID(std::string& parameter) const;
87 std::string getRequestedProcedureIDTag() const { return "(0040,1001)"; }
88 bool setRequestedProcedureID(std::string parameter);
89
90 // ScheduledProcedureStepDescription (0040,0007) vr=LO, vm=1, type=3
91 bool getScheduledProcedureStepDescription(std::string& parameter) const;
92 std::string getScheduledProcedureStepDescriptionTag() const { return "(0040,0007)"; }
93 bool setScheduledProcedureStepDescription(std::string parameter);
94
95 // ScheduledProcedureStepID (0040,0009) vr=SH, vm=1, type=1
96 bool getScheduledProcedureStepID(std::string& parameter) const;
97 std::string getScheduledProcedureStepIDTag() const { return "(0040,0009)"; }
98 bool setScheduledProcedureStepID(std::string parameter);
99
100 // StudyInstanceUID (0020,000d) vr=UI, vm=1, type=3
101 bool getStudyInstanceUID(std::string& parameter) const;
102 std::string getStudyInstanceUIDTag() const { return "(0020,000d)"; }
103 bool setStudyInstanceUID(std::string parameter);
104
105 // ReasonForRequestedProcedureCodeSequence (0040,100a) vr=SQ, vm=1, type=3
107 std::string getReasonForRequestedProcedureCodeSequenceTag() const { return std::string("(0040,100a)"); }
109
110 // ReferencedStudySequence (0008,1110) vr=SQ, vm=1, type=3
112 std::string getReferencedStudySequenceTag() const { return std::string("(0008,1110)"); }
114
115 // RequestedProcedureCodeSequence (0032,1064) vr=SQ, vm=1, type=3
117 std::string getRequestedProcedureCodeSequenceTag() const { return std::string("(0032,1064)"); }
119
120 // ScheduledProtocolCodeSequence (0040,0008) vr=SQ, vm=1, type=3
122 std::string getScheduledProtocolCodeSequenceTag() const { return std::string("(0040,0008)"); }
124
125
126 private:
127
128 DCMTree::TreePtr _dcmItem;
129
130 };
131
133
135 DcmDRTRequestAttributesSequenceInterface(std::vector<DcmDRTRequestAttributesSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
136
143
146 // AccessionNumber (0008,0050) vr=SH, vm=1, type=3
147 bool getAccessionNumber(unsigned long idx, std::string& parameter) const;
148 bool getAccessionNumber(DCMTree::TreePtr item, std::string& parameter) const;
149 std::string getAccessionNumberTag() const { return "(0008,0050)"; }
150 bool setAccessionNumber(unsigned long idx, std::string parameter);
151
152 // ReasonForTheRequestedProcedure (0040,1002) vr=LO, vm=1, type=3
153 bool getReasonForTheRequestedProcedure(unsigned long idx, std::string& parameter) const;
154 bool getReasonForTheRequestedProcedure(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getReasonForTheRequestedProcedureTag() const { return "(0040,1002)"; }
156 bool setReasonForTheRequestedProcedure(unsigned long idx, std::string parameter);
157
158 // RequestedProcedureDescription (0032,1060) vr=LO, vm=1, type=3
159 bool getRequestedProcedureDescription(unsigned long idx, std::string& parameter) const;
160 bool getRequestedProcedureDescription(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getRequestedProcedureDescriptionTag() const { return "(0032,1060)"; }
162 bool setRequestedProcedureDescription(unsigned long idx, std::string parameter);
163
164 // RequestedProcedureID (0040,1001) vr=SH, vm=1, type=1
165 bool getRequestedProcedureID(unsigned long idx, std::string& parameter) const;
166 bool getRequestedProcedureID(DCMTree::TreePtr item, std::string& parameter) const;
167 std::string getRequestedProcedureIDTag() const { return "(0040,1001)"; }
168 bool setRequestedProcedureID(unsigned long idx, std::string parameter);
169
170 // ScheduledProcedureStepDescription (0040,0007) vr=LO, vm=1, type=3
171 bool getScheduledProcedureStepDescription(unsigned long idx, std::string& parameter) const;
172 bool getScheduledProcedureStepDescription(DCMTree::TreePtr item, std::string& parameter) const;
173 std::string getScheduledProcedureStepDescriptionTag() const { return "(0040,0007)"; }
174 bool setScheduledProcedureStepDescription(unsigned long idx, std::string parameter);
175
176 // ScheduledProcedureStepID (0040,0009) vr=SH, vm=1, type=1
177 bool getScheduledProcedureStepID(unsigned long idx, std::string& parameter) const;
178 bool getScheduledProcedureStepID(DCMTree::TreePtr item, std::string& parameter) const;
179 std::string getScheduledProcedureStepIDTag() const { return "(0040,0009)"; }
180 bool setScheduledProcedureStepID(unsigned long idx, std::string parameter);
181
182 // StudyInstanceUID (0020,000d) vr=UI, vm=1, type=3
183 bool getStudyInstanceUID(unsigned long idx, std::string& parameter) const;
184 bool getStudyInstanceUID(DCMTree::TreePtr item, std::string& parameter) const;
185 std::string getStudyInstanceUIDTag() const { return "(0020,000d)"; }
186 bool setStudyInstanceUID(unsigned long idx, std::string parameter);
187
188 // ReasonForRequestedProcedureCodeSequence (0040,100a) vr=SQ, vm=1, type=3
190 std::string getReasonForRequestedProcedureCodeSequenceTag() const { return std::string("(0040,100a)"); }
192
193 // ReferencedStudySequence (0008,1110) vr=SQ, vm=1, type=3
195 std::string getReferencedStudySequenceTag() const { return std::string("(0008,1110)"); }
197
198 // RequestedProcedureCodeSequence (0032,1064) vr=SQ, vm=1, type=3
200 std::string getRequestedProcedureCodeSequenceTag() const { return std::string("(0032,1064)"); }
202
203 // ScheduledProtocolCodeSequence (0040,0008) vr=SQ, vm=1, type=3
205 std::string getScheduledProtocolCodeSequenceTag() const { return std::string("(0040,0008)"); }
207
208
211 void setSequence(std::vector<DcmDRTRequestAttributesSequenceInterface::Item> dcmSequence) {
212 _itemVec = dcmSequence;
213 }
214
217 std::vector<DcmDRTRequestAttributesSequenceInterface::Item> getSequence() const {
218 return _itemVec;
219 }
220
223 bool hasSequence() const {
224 return (_itemVec.size() != 0);
225 }
226
230 return static_cast<MLint>(_itemVec.size());
231 }
232
236 if (_itemVec.size() > idx) {
237 return _itemVec[idx];
238 }
240 }
241
246 return _itemVec[_itemVec.size()-1];
247 }
248
252
255 bool insertItem(const size_t idx) {
256 if (_itemVec.size() > idx) {
257 std::vector<DcmDRTRequestAttributesSequenceInterface::Item>::iterator it = _itemVec.begin();
258 std::advance(it, idx);
260 return true;
261 }
262 return false;
263 }
264
267 bool removeItem(const size_t idx) {
268 if ( _itemVec.size() > idx ) {
269 std::vector<DcmDRTRequestAttributesSequenceInterface::Item>::iterator it = _itemVec.begin();
270 std::advance(it, idx);
271 _itemVec.erase(it);
272 return true;
273 }
274 return false;
275 }
276
277 protected:
279 std::vector<DcmDRTRequestAttributesSequenceInterface::Item> _itemVec;
280};
281
283
284#endif // __mlDcmDRTRequestAttributesSequenceInterface_H
285
286/* MeVis-Hidden-Components-Start */
287/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTReasonForRequestedProcedureCodeSequence.
Class to provide access to DRTReferencedStudySequence.
bool getScheduledProcedureStepID(std::string &parameter) const
void setRequestedProcedureCodeSequence(DcmDRTRequestedProcedureCodeSequenceInterface seq)
DcmDRTScheduledProtocolCodeSequenceInterface getScheduledProtocolCodeSequence() const
bool getAccessionNumber(std::string &parameter) const
DcmDRTReferencedStudySequenceInterface getReferencedStudySequence() const
void setReasonForRequestedProcedureCodeSequence(DcmDRTReasonForRequestedProcedureCodeSequenceInterface seq)
bool setScheduledProcedureStepID(std::string parameter)
bool getReasonForTheRequestedProcedure(std::string &parameter) const
void setScheduledProtocolCodeSequence(DcmDRTScheduledProtocolCodeSequenceInterface seq)
bool setRequestedProcedureDescription(std::string parameter)
bool setRequestedProcedureID(std::string parameter)
bool getStudyInstanceUID(std::string &parameter) const
DcmDRTRequestedProcedureCodeSequenceInterface getRequestedProcedureCodeSequence() const
bool setScheduledProcedureStepDescription(std::string parameter)
bool setReasonForTheRequestedProcedure(std::string parameter)
bool getScheduledProcedureStepDescription(std::string &parameter) const
DcmDRTReasonForRequestedProcedureCodeSequenceInterface getReasonForRequestedProcedureCodeSequence() const
bool getRequestedProcedureID(std::string &parameter) const
void setReferencedStudySequence(DcmDRTReferencedStudySequenceInterface seq)
bool getRequestedProcedureDescription(std::string &parameter) const
Class to provide access to DRTRequestAttributesSequence.
DcmDRTRequestAttributesSequenceInterface(std::vector< DcmDRTRequestAttributesSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getRequestedProcedureDescription(DCMTree::TreePtr item, std::string &parameter) const
bool getRequestedProcedureID(unsigned long idx, std::string &parameter) const
DcmDRTRequestAttributesSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getReasonForTheRequestedProcedure(unsigned long idx, std::string &parameter) const
bool getStudyInstanceUID(DCMTree::TreePtr item, std::string &parameter) const
void setReferencedStudySequence(DcmDRTReferencedStudySequenceInterface seq, unsigned long idx)
void setReasonForRequestedProcedureCodeSequence(DcmDRTReasonForRequestedProcedureCodeSequenceInterface seq, unsigned long idx)
bool getAccessionNumber(unsigned long idx, std::string &parameter) const
std::vector< DcmDRTRequestAttributesSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
void setSequence(std::vector< DcmDRTRequestAttributesSequenceInterface::Item > dcmSequence)
Set the DRTRequestAttributesSequence this interface class provides access to.
bool getScheduledProcedureStepID(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTScheduledProtocolCodeSequenceInterface getScheduledProtocolCodeSequence(unsigned long idx) const
void setRequestedProcedureCodeSequence(DcmDRTRequestedProcedureCodeSequenceInterface seq, unsigned long idx)
bool setStudyInstanceUID(unsigned long idx, std::string parameter)
DcmDRTReasonForRequestedProcedureCodeSequenceInterface getReasonForRequestedProcedureCodeSequence(unsigned long idx) const
bool setScheduledProcedureStepID(unsigned long idx, std::string parameter)
bool setRequestedProcedureDescription(unsigned long idx, std::string parameter)
bool getReasonForTheRequestedProcedure(DCMTree::TreePtr item, std::string &parameter) const
bool hasSequence() const
Check if the DRTRequestAttributesSequence is set.
DcmDRTReferencedStudySequenceInterface getReferencedStudySequence(unsigned long idx) const
bool getScheduledProcedureStepID(unsigned long idx, std::string &parameter) const
DcmDRTRequestAttributesSequenceInterface::Item & addItem()
Adds a new item to the sequence.
void setScheduledProtocolCodeSequence(DcmDRTScheduledProtocolCodeSequenceInterface seq, unsigned long idx)
DcmDRTRequestedProcedureCodeSequenceInterface getRequestedProcedureCodeSequence(unsigned long idx) const
bool getAccessionNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setScheduledProcedureStepDescription(unsigned long idx, std::string parameter)
bool setRequestedProcedureID(unsigned long idx, std::string parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setReasonForTheRequestedProcedure(unsigned long idx, std::string parameter)
bool getStudyInstanceUID(unsigned long idx, std::string &parameter) const
bool getScheduledProcedureStepDescription(unsigned long idx, std::string &parameter) const
bool setAccessionNumber(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getRequestedProcedureID(DCMTree::TreePtr item, std::string &parameter) const
bool getRequestedProcedureDescription(unsigned long idx, std::string &parameter) const
bool getScheduledProcedureStepDescription(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
void addItem(DcmDRTRequestAttributesSequenceInterface::Item newItem)
std::vector< DcmDRTRequestAttributesSequenceInterface::Item > getSequence() const
Return the DRTRequestAttributesSequence this interface class provides access to.
Class to provide access to DRTRequestedProcedureCodeSequence.
Class to provide access to DRTScheduledProtocolCodeSequence.
Class to provide access to DRTReasonForRequestedProcedureCodeSequence.
Class to provide access to DRTReferencedStudySequence.
Class to provide access to DRTRequestedProcedureCodeSequence.
Class to provide access to DRTScheduledProtocolCodeSequence.
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