MeVisLab Toolbox Reference
mlDcmDRTCodingSchemeIdentificationSequenceInterface.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 __mlDcmDRTCodingSchemeIdentificationSequenceInterface_H
24#define __mlDcmDRTCodingSchemeIdentificationSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTCodingSchemeIdentificationSequenceInterface.h" //DRTCodingSchemeIdentificationSequence
31
32
33// ML includes
34#ifndef __mlModuleIncludes_H
35#include "mlModuleIncludes.h"
36#endif
37
39
40// ------------------------------------------------------------------
42// ------------------------------------------------------------------
44{
45 public:
46
48 {
49 public:
50
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
52
54
55 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
56
57 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
58
59 virtual ~Item() {}
60
61 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
62
63 bool isValid() const { return _dcmItem.get() != nullptr; }
64
65
66 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1
67 bool getCodingSchemeDesignator(std::string& parameter) const;
68 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
69 bool setCodingSchemeDesignator(std::string parameter);
70
71 // CodingSchemeExternalID (0008,0114) vr=ST, vm=1, type=2C
72 bool getCodingSchemeExternalID(std::string& parameter) const;
73 std::string getCodingSchemeExternalIDTag() const { return "(0008,0114)"; }
74 bool setCodingSchemeExternalID(std::string parameter);
75
76 // CodingSchemeName (0008,0115) vr=ST, vm=1, type=3
77 bool getCodingSchemeName(std::string& parameter) const;
78 std::string getCodingSchemeNameTag() const { return "(0008,0115)"; }
79 bool setCodingSchemeName(std::string parameter);
80
81 // CodingSchemeRegistry (0008,0112) vr=LO, vm=1, type=1C
82 bool getCodingSchemeRegistry(std::string& parameter) const;
83 std::string getCodingSchemeRegistryTag() const { return "(0008,0112)"; }
84 bool setCodingSchemeRegistry(std::string parameter);
85
86 // CodingSchemeResponsibleOrganization (0008,0116) vr=ST, vm=1, type=3
87 bool getCodingSchemeResponsibleOrganization(std::string& parameter) const;
88 std::string getCodingSchemeResponsibleOrganizationTag() const { return "(0008,0116)"; }
89 bool setCodingSchemeResponsibleOrganization(std::string parameter);
90
91 // CodingSchemeUID (0008,010c) vr=UI, vm=1, type=1C
92 bool getCodingSchemeUID(std::string& parameter) const;
93 std::string getCodingSchemeUIDTag() const { return "(0008,010c)"; }
94 bool setCodingSchemeUID(std::string parameter);
95
96 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=3
97 bool getCodingSchemeVersion(std::string& parameter) const;
98 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
99 bool setCodingSchemeVersion(std::string parameter);
100
101
102 private:
103
104 DCMTree::TreePtr _dcmItem;
105
106 };
107
109
111 DcmDRTCodingSchemeIdentificationSequenceInterface(std::vector<DcmDRTCodingSchemeIdentificationSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
112
119
122 // CodingSchemeDesignator (0008,0102) vr=SH, vm=1, type=1
123 bool getCodingSchemeDesignator(unsigned long idx, std::string& parameter) const;
124 bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string& parameter) const;
125 std::string getCodingSchemeDesignatorTag() const { return "(0008,0102)"; }
126 bool setCodingSchemeDesignator(unsigned long idx, std::string parameter);
127
128 // CodingSchemeExternalID (0008,0114) vr=ST, vm=1, type=2C
129 bool getCodingSchemeExternalID(unsigned long idx, std::string& parameter) const;
130 bool getCodingSchemeExternalID(DCMTree::TreePtr item, std::string& parameter) const;
131 std::string getCodingSchemeExternalIDTag() const { return "(0008,0114)"; }
132 bool setCodingSchemeExternalID(unsigned long idx, std::string parameter);
133
134 // CodingSchemeName (0008,0115) vr=ST, vm=1, type=3
135 bool getCodingSchemeName(unsigned long idx, std::string& parameter) const;
136 bool getCodingSchemeName(DCMTree::TreePtr item, std::string& parameter) const;
137 std::string getCodingSchemeNameTag() const { return "(0008,0115)"; }
138 bool setCodingSchemeName(unsigned long idx, std::string parameter);
139
140 // CodingSchemeRegistry (0008,0112) vr=LO, vm=1, type=1C
141 bool getCodingSchemeRegistry(unsigned long idx, std::string& parameter) const;
142 bool getCodingSchemeRegistry(DCMTree::TreePtr item, std::string& parameter) const;
143 std::string getCodingSchemeRegistryTag() const { return "(0008,0112)"; }
144 bool setCodingSchemeRegistry(unsigned long idx, std::string parameter);
145
146 // CodingSchemeResponsibleOrganization (0008,0116) vr=ST, vm=1, type=3
147 bool getCodingSchemeResponsibleOrganization(unsigned long idx, std::string& parameter) const;
149 std::string getCodingSchemeResponsibleOrganizationTag() const { return "(0008,0116)"; }
150 bool setCodingSchemeResponsibleOrganization(unsigned long idx, std::string parameter);
151
152 // CodingSchemeUID (0008,010c) vr=UI, vm=1, type=1C
153 bool getCodingSchemeUID(unsigned long idx, std::string& parameter) const;
154 bool getCodingSchemeUID(DCMTree::TreePtr item, std::string& parameter) const;
155 std::string getCodingSchemeUIDTag() const { return "(0008,010c)"; }
156 bool setCodingSchemeUID(unsigned long idx, std::string parameter);
157
158 // CodingSchemeVersion (0008,0103) vr=SH, vm=1, type=3
159 bool getCodingSchemeVersion(unsigned long idx, std::string& parameter) const;
160 bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string& parameter) const;
161 std::string getCodingSchemeVersionTag() const { return "(0008,0103)"; }
162 bool setCodingSchemeVersion(unsigned long idx, std::string parameter);
163
164
167 void setSequence(std::vector<DcmDRTCodingSchemeIdentificationSequenceInterface::Item> dcmSequence) {
168 _itemVec = dcmSequence;
169 }
170
173 std::vector<DcmDRTCodingSchemeIdentificationSequenceInterface::Item> getSequence() const {
174 return _itemVec;
175 }
176
179 bool hasSequence() const {
180 return (_itemVec.size() != 0);
181 }
182
186 return static_cast<MLint>(_itemVec.size());
187 }
188
192 if (_itemVec.size() > idx) {
193 return _itemVec[idx];
194 }
196 }
197
202 return _itemVec[_itemVec.size()-1];
203 }
204
208
211 bool insertItem(const size_t idx) {
212 if (_itemVec.size() > idx) {
213 std::vector<DcmDRTCodingSchemeIdentificationSequenceInterface::Item>::iterator it = _itemVec.begin();
214 std::advance(it, idx);
216 return true;
217 }
218 return false;
219 }
220
223 bool removeItem(const size_t idx) {
224 if ( _itemVec.size() > idx ) {
225 std::vector<DcmDRTCodingSchemeIdentificationSequenceInterface::Item>::iterator it = _itemVec.begin();
226 std::advance(it, idx);
227 _itemVec.erase(it);
228 return true;
229 }
230 return false;
231 }
232
233 protected:
235 std::vector<DcmDRTCodingSchemeIdentificationSequenceInterface::Item> _itemVec;
236};
237
239
240#endif // __mlDcmDRTCodingSchemeIdentificationSequenceInterface_H
241
242/* MeVis-Hidden-Components-Start */
243/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getCodingSchemeExternalID(std::string &parameter) const
bool getCodingSchemeUID(std::string &parameter) const
bool setCodingSchemeResponsibleOrganization(std::string parameter)
bool getCodingSchemeRegistry(std::string &parameter) const
bool getCodingSchemeVersion(std::string &parameter) const
bool getCodingSchemeDesignator(std::string &parameter) const
bool getCodingSchemeName(std::string &parameter) const
bool getCodingSchemeResponsibleOrganization(std::string &parameter) const
Class to provide access to DRTCodingSchemeIdentificationSequence.
bool setCodingSchemeDesignator(unsigned long idx, std::string parameter)
bool getCodingSchemeUID(unsigned long idx, std::string &parameter) const
bool getCodingSchemeVersion(DCMTree::TreePtr item, std::string &parameter) const
bool getCodingSchemeUID(DCMTree::TreePtr item, std::string &parameter) const
bool getCodingSchemeDesignator(DCMTree::TreePtr item, std::string &parameter) const
bool setCodingSchemeVersion(unsigned long idx, std::string parameter)
std::vector< DcmDRTCodingSchemeIdentificationSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getCodingSchemeName(DCMTree::TreePtr item, std::string &parameter) const
bool getCodingSchemeResponsibleOrganization(unsigned long idx, std::string &parameter) const
bool getCodingSchemeExternalID(DCMTree::TreePtr item, std::string &parameter) const
bool setCodingSchemeExternalID(unsigned long idx, std::string parameter)
bool getCodingSchemeName(unsigned long idx, std::string &parameter) const
DcmDRTCodingSchemeIdentificationSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getCodingSchemeResponsibleOrganization(DCMTree::TreePtr item, std::string &parameter) const
bool getCodingSchemeRegistry(unsigned long idx, std::string &parameter) const
DcmDRTCodingSchemeIdentificationSequenceInterface::Item & addItem()
Adds a new item to the sequence.
DcmDRTCodingSchemeIdentificationSequenceInterface(std::vector< DcmDRTCodingSchemeIdentificationSequenceInterface::Item > dcmSequence)
Default Constructor.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getCodingSchemeExternalID(unsigned long idx, std::string &parameter) const
bool getCodingSchemeRegistry(DCMTree::TreePtr item, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
void setSequence(std::vector< DcmDRTCodingSchemeIdentificationSequenceInterface::Item > dcmSequence)
Set the DRTCodingSchemeIdentificationSequence this interface class provides access to.
std::vector< DcmDRTCodingSchemeIdentificationSequenceInterface::Item > getSequence() const
Return the DRTCodingSchemeIdentificationSequence this interface class provides access to.
bool getCodingSchemeDesignator(unsigned long idx, std::string &parameter) const
bool getCodingSchemeVersion(unsigned long idx, std::string &parameter) const
bool setCodingSchemeName(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTCodingSchemeIdentificationSequence is set.
bool setCodingSchemeResponsibleOrganization(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
void addItem(DcmDRTCodingSchemeIdentificationSequenceInterface::Item newItem)
bool setCodingSchemeUID(unsigned long idx, std::string parameter)
bool setCodingSchemeRegistry(unsigned long idx, std::string parameter)
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