MeVisLab Toolbox Reference
mlDcmDRTReferringPhysicianIdentificationSequenceInterface.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 __mlDcmDRTReferringPhysicianIdentificationSequenceInterface_H
24#define __mlDcmDRTReferringPhysicianIdentificationSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTReferringPhysicianIdentificationSequenceInterface.h" //DRTReferringPhysicianIdentificationSequence
31#include "mlDcmDRTInstitutionCodeSequenceInterface.h" //DRTInstitutionCodeSequence
32#include "mlDcmDRTPersonIdentificationCodeSequenceInterface.h" //DRTPersonIdentificationCodeSequence
33
34
35// ML includes
36#ifndef __mlModuleIncludes_H
37#include "mlModuleIncludes.h"
38#endif
39
41
42// ------------------------------------------------------------------
44// ------------------------------------------------------------------
46{
47 public:
48
50 {
51 public:
52
53 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
54
56
57 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
58
59 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
60
61 virtual ~Item() {}
62
63 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
64
65 bool isValid() const { return _dcmItem.get() != nullptr; }
66
67
68 // InstitutionAddress (0008,0081) vr=ST, vm=1, type=3
69 bool getInstitutionAddress(std::string& parameter) const;
70 std::string getInstitutionAddressTag() const { return "(0008,0081)"; }
71 bool setInstitutionAddress(std::string parameter);
72
73 // InstitutionName (0008,0080) vr=LO, vm=1, type=1C
74 bool getInstitutionName(std::string& parameter) const;
75 std::string getInstitutionNameTag() const { return "(0008,0080)"; }
76 bool setInstitutionName(std::string parameter);
77
78 // PersonAddress (0040,1102) vr=ST, vm=1, type=3
79 bool getPersonAddress(std::string& parameter) const;
80 std::string getPersonAddressTag() const { return "(0040,1102)"; }
81 bool setPersonAddress(std::string parameter);
82
83 // PersonTelephoneNumbers (0040,1103) vr=LO, vm=1-n, type=3
84 bool getPersonTelephoneNumbers(std::string& parameter) const;
85 std::string getPersonTelephoneNumbersTag() const { return "(0040,1103)"; }
86 bool setPersonTelephoneNumbers(std::string parameter);
87
88 // InstitutionCodeSequence (0008,0082) vr=SQ, vm=1, type=1C
90 std::string getInstitutionCodeSequenceTag() const { return std::string("(0008,0082)"); }
92
93 // PersonIdentificationCodeSequence (0040,1101) vr=SQ, vm=1, type=1
95 std::string getPersonIdentificationCodeSequenceTag() const { return std::string("(0040,1101)"); }
97
98
99 private:
100
101 DCMTree::TreePtr _dcmItem;
102
103 };
104
106
108 DcmDRTReferringPhysicianIdentificationSequenceInterface(std::vector<DcmDRTReferringPhysicianIdentificationSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
109
116
119 // InstitutionAddress (0008,0081) vr=ST, vm=1, type=3
120 bool getInstitutionAddress(unsigned long idx, std::string& parameter) const;
121 bool getInstitutionAddress(DCMTree::TreePtr item, std::string& parameter) const;
122 std::string getInstitutionAddressTag() const { return "(0008,0081)"; }
123 bool setInstitutionAddress(unsigned long idx, std::string parameter);
124
125 // InstitutionName (0008,0080) vr=LO, vm=1, type=1C
126 bool getInstitutionName(unsigned long idx, std::string& parameter) const;
127 bool getInstitutionName(DCMTree::TreePtr item, std::string& parameter) const;
128 std::string getInstitutionNameTag() const { return "(0008,0080)"; }
129 bool setInstitutionName(unsigned long idx, std::string parameter);
130
131 // PersonAddress (0040,1102) vr=ST, vm=1, type=3
132 bool getPersonAddress(unsigned long idx, std::string& parameter) const;
133 bool getPersonAddress(DCMTree::TreePtr item, std::string& parameter) const;
134 std::string getPersonAddressTag() const { return "(0040,1102)"; }
135 bool setPersonAddress(unsigned long idx, std::string parameter);
136
137 // PersonTelephoneNumbers (0040,1103) vr=LO, vm=1-n, type=3
138 bool getPersonTelephoneNumbers(unsigned long idx, std::string& parameter) const;
139 bool getPersonTelephoneNumbers(DCMTree::TreePtr item, std::string& parameter) const;
140 std::string getPersonTelephoneNumbersTag() const { return "(0040,1103)"; }
141 bool setPersonTelephoneNumbers(unsigned long idx, std::string parameter);
142
143 // InstitutionCodeSequence (0008,0082) vr=SQ, vm=1, type=1C
145 std::string getInstitutionCodeSequenceTag() const { return std::string("(0008,0082)"); }
147
148 // PersonIdentificationCodeSequence (0040,1101) vr=SQ, vm=1, type=1
150 std::string getPersonIdentificationCodeSequenceTag() const { return std::string("(0040,1101)"); }
152
153
156 void setSequence(std::vector<DcmDRTReferringPhysicianIdentificationSequenceInterface::Item> dcmSequence) {
157 _itemVec = dcmSequence;
158 }
159
162 std::vector<DcmDRTReferringPhysicianIdentificationSequenceInterface::Item> getSequence() const {
163 return _itemVec;
164 }
165
168 bool hasSequence() const {
169 return (_itemVec.size() != 0);
170 }
171
175 return static_cast<MLint>(_itemVec.size());
176 }
177
181 if (_itemVec.size() > idx) {
182 return _itemVec[idx];
183 }
185 }
186
193
197
200 bool insertItem(const size_t idx) {
201 if (_itemVec.size() > idx) {
202 std::vector<DcmDRTReferringPhysicianIdentificationSequenceInterface::Item>::iterator it = _itemVec.begin();
203 std::advance(it, idx);
205 return true;
206 }
207 return false;
208 }
209
212 bool removeItem(const size_t idx) {
213 if ( _itemVec.size() > idx ) {
214 std::vector<DcmDRTReferringPhysicianIdentificationSequenceInterface::Item>::iterator it = _itemVec.begin();
215 std::advance(it, idx);
216 _itemVec.erase(it);
217 return true;
218 }
219 return false;
220 }
221
222 protected:
224 std::vector<DcmDRTReferringPhysicianIdentificationSequenceInterface::Item> _itemVec;
225};
226
228
229#endif // __mlDcmDRTReferringPhysicianIdentificationSequenceInterface_H
230
231/* MeVis-Hidden-Components-Start */
232/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTInstitutionCodeSequence.
Class to provide access to DRTPersonIdentificationCodeSequence.
DcmDRTPersonIdentificationCodeSequenceInterface getPersonIdentificationCodeSequence() const
void setInstitutionCodeSequence(DcmDRTInstitutionCodeSequenceInterface seq)
void setPersonIdentificationCodeSequence(DcmDRTPersonIdentificationCodeSequenceInterface seq)
DcmDRTInstitutionCodeSequenceInterface getInstitutionCodeSequence() const
Class to provide access to DRTReferringPhysicianIdentificationSequence.
std::vector< DcmDRTReferringPhysicianIdentificationSequenceInterface::Item > getSequence() const
Return the DRTReferringPhysicianIdentificationSequence this interface class provides access to.
void addItem(DcmDRTReferringPhysicianIdentificationSequenceInterface::Item newItem)
DcmDRTReferringPhysicianIdentificationSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getInstitutionAddress(DCMTree::TreePtr item, std::string &parameter) const
bool getInstitutionName(unsigned long idx, std::string &parameter) const
void setPersonIdentificationCodeSequence(DcmDRTPersonIdentificationCodeSequenceInterface seq, unsigned long idx)
DcmDRTInstitutionCodeSequenceInterface getInstitutionCodeSequence(unsigned long idx) const
bool setInstitutionAddress(unsigned long idx, std::string parameter)
DcmDRTPersonIdentificationCodeSequenceInterface getPersonIdentificationCodeSequence(unsigned long idx) const
bool setInstitutionName(unsigned long idx, std::string parameter)
bool getPersonTelephoneNumbers(DCMTree::TreePtr item, std::string &parameter) const
bool getInstitutionAddress(unsigned long idx, std::string &parameter) const
DcmDRTReferringPhysicianIdentificationSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
void setInstitutionCodeSequence(DcmDRTInstitutionCodeSequenceInterface seq, unsigned long idx)
bool setPersonAddress(unsigned long idx, std::string parameter)
void setSequence(std::vector< DcmDRTReferringPhysicianIdentificationSequenceInterface::Item > dcmSequence)
Set the DRTReferringPhysicianIdentificationSequence this interface class provides access to.
DcmDRTReferringPhysicianIdentificationSequenceInterface(std::vector< DcmDRTReferringPhysicianIdentificationSequenceInterface::Item > dcmSequence)
Default Constructor.
bool hasSequence() const
Check if the DRTReferringPhysicianIdentificationSequence is set.
bool getPersonAddress(DCMTree::TreePtr item, std::string &parameter) const
bool setPersonTelephoneNumbers(unsigned long idx, std::string parameter)
bool getPersonTelephoneNumbers(unsigned long idx, std::string &parameter) const
bool getPersonAddress(unsigned long idx, std::string &parameter) const
bool getInstitutionName(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTReferringPhysicianIdentificationSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
Class to provide access to DRTInstitutionCodeSequence.
Class to provide access to DRTPersonIdentificationCodeSequence.
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