MeVisLab Toolbox Reference
mlDcmDRTPhysiciansOfRecordIdentificationSequenceInterface.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 __mlDcmDRTPhysiciansOfRecordIdentificationSequenceInterface_H
24#define __mlDcmDRTPhysiciansOfRecordIdentificationSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTPhysiciansOfRecordIdentificationSequenceInterface.h" //DRTPhysiciansOfRecordIdentificationSequence
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 DcmDRTPhysiciansOfRecordIdentificationSequenceInterface(std::vector<DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::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<DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item> dcmSequence) {
157 _itemVec = dcmSequence;
158 }
159
162 std::vector<DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::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<DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::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<DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::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<DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item> _itemVec;
225};
226
228
229#endif // __mlDcmDRTPhysiciansOfRecordIdentificationSequenceInterface_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.
void setInstitutionCodeSequence(DcmDRTInstitutionCodeSequenceInterface seq)
DcmDRTInstitutionCodeSequenceInterface getInstitutionCodeSequence() const
DcmDRTPersonIdentificationCodeSequenceInterface getPersonIdentificationCodeSequence() const
void setPersonIdentificationCodeSequence(DcmDRTPersonIdentificationCodeSequenceInterface seq)
Class to provide access to DRTPhysiciansOfRecordIdentificationSequence.
DcmDRTPhysiciansOfRecordIdentificationSequenceInterface(std::vector< DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item > dcmSequence)
Default Constructor.
std::vector< DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item > getSequence() const
Return the DRTPhysiciansOfRecordIdentificationSequence this interface class provides access to.
bool getPersonAddress(DCMTree::TreePtr item, std::string &parameter) const
bool getInstitutionName(DCMTree::TreePtr item, std::string &parameter) const
std::vector< DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setInstitutionAddress(unsigned long idx, std::string parameter)
DcmDRTPersonIdentificationCodeSequenceInterface getPersonIdentificationCodeSequence(unsigned long idx) const
bool getPersonTelephoneNumbers(DCMTree::TreePtr item, std::string &parameter) const
bool getInstitutionName(unsigned long idx, std::string &parameter) const
DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
void setPersonIdentificationCodeSequence(DcmDRTPersonIdentificationCodeSequenceInterface seq, unsigned long idx)
bool setPersonAddress(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getInstitutionAddress(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item > dcmSequence)
Set the DRTPhysiciansOfRecordIdentificationSequence this interface class provides access to.
void setInstitutionCodeSequence(DcmDRTInstitutionCodeSequenceInterface seq, unsigned long idx)
bool getPersonTelephoneNumbers(unsigned long idx, std::string &parameter) const
bool setPersonTelephoneNumbers(unsigned long idx, std::string parameter)
DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool hasSequence() const
Check if the DRTPhysiciansOfRecordIdentificationSequence is set.
bool getPersonAddress(unsigned long idx, std::string &parameter) const
bool setInstitutionName(unsigned long idx, std::string parameter)
DcmDRTInstitutionCodeSequenceInterface getInstitutionCodeSequence(unsigned long idx) const
bool getInstitutionAddress(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTPhysiciansOfRecordIdentificationSequenceInterface::Item newItem)
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