MeVisLab Toolbox Reference
mlDcmDRTDigitalSignaturesSequenceInterface.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 __mlDcmDRTDigitalSignaturesSequenceInterface_H
24#define __mlDcmDRTDigitalSignaturesSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTDigitalSignaturesSequenceInterface.h" //DRTDigitalSignaturesSequence
31#include "mlDcmDRTDigitalSignaturePurposeCodeSequenceInterface.h" //DRTDigitalSignaturePurposeCodeSequence
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 // CertificateOfSigner (0400,0115) vr=OB, vm=1, type=1
68 bool getCertificateOfSigner(int& parameter) const;
69 std::string getCertificateOfSignerTag() const { return "(0400,0115)"; }
70 bool setCertificateOfSigner(int parameter);
71
72 // CertificateType (0400,0110) vr=CS, vm=1, type=1
73 bool getCertificateType(std::string& parameter) const;
74 std::string getCertificateTypeTag() const { return "(0400,0110)"; }
75 bool setCertificateType(std::string parameter);
76
77 // CertifiedTimestamp (0400,0310) vr=OB, vm=1, type=3
78 bool getCertifiedTimestamp(int& parameter) const;
79 std::string getCertifiedTimestampTag() const { return "(0400,0310)"; }
80 bool setCertifiedTimestamp(int parameter);
81
82 // CertifiedTimestampType (0400,0305) vr=CS, vm=1, type=1C
83 bool getCertifiedTimestampType(std::string& parameter) const;
84 std::string getCertifiedTimestampTypeTag() const { return "(0400,0305)"; }
85 bool setCertifiedTimestampType(std::string parameter);
86
87 // DigitalSignatureDateTime (0400,0105) vr=DT, vm=1, type=1
88 bool getDigitalSignatureDateTime(std::string& parameter) const;
89 std::string getDigitalSignatureDateTimeTag() const { return "(0400,0105)"; }
90 bool setDigitalSignatureDateTime(std::string parameter);
91
92 // DigitalSignatureUID (0400,0100) vr=UI, vm=1, type=1
93 bool getDigitalSignatureUID(std::string& parameter) const;
94 std::string getDigitalSignatureUIDTag() const { return "(0400,0100)"; }
95 bool setDigitalSignatureUID(std::string parameter);
96
97 // MACIDNumber (0400,0005) vr=US, vm=1, type=1
98 bool getMACIDNumber(MLuint16& parameter) const;
99 std::string getMACIDNumberTag() const { return "(0400,0005)"; }
100 bool setMACIDNumber(MLuint16 parameter);
101
102 // Signature (0400,0120) vr=OB, vm=1, type=1
103 bool getSignature(int& parameter) const;
104 std::string getSignatureTag() const { return "(0400,0120)"; }
105 bool setSignature(int parameter);
106
107 // DigitalSignaturePurposeCodeSequence (0400,0401) vr=SQ, vm=1, type=3
109 std::string getDigitalSignaturePurposeCodeSequenceTag() const { return std::string("(0400,0401)"); }
111
112
113 private:
114
115 DCMTree::TreePtr _dcmItem;
116
117 };
118
120
122 DcmDRTDigitalSignaturesSequenceInterface(std::vector<DcmDRTDigitalSignaturesSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
123
130
133 // CertificateOfSigner (0400,0115) vr=OB, vm=1, type=1
134 bool getCertificateOfSigner(unsigned long idx, int& parameter) const;
135 bool getCertificateOfSigner(DCMTree::TreePtr item, int& parameter) const;
136 std::string getCertificateOfSignerTag() const { return "(0400,0115)"; }
137 bool setCertificateOfSigner(unsigned long idx, int parameter);
138
139 // CertificateType (0400,0110) vr=CS, vm=1, type=1
140 bool getCertificateType(unsigned long idx, std::string& parameter) const;
141 bool getCertificateType(DCMTree::TreePtr item, std::string& parameter) const;
142 std::string getCertificateTypeTag() const { return "(0400,0110)"; }
143 bool setCertificateType(unsigned long idx, std::string parameter);
144
145 // CertifiedTimestamp (0400,0310) vr=OB, vm=1, type=3
146 bool getCertifiedTimestamp(unsigned long idx, int& parameter) const;
147 bool getCertifiedTimestamp(DCMTree::TreePtr item, int& parameter) const;
148 std::string getCertifiedTimestampTag() const { return "(0400,0310)"; }
149 bool setCertifiedTimestamp(unsigned long idx, int parameter);
150
151 // CertifiedTimestampType (0400,0305) vr=CS, vm=1, type=1C
152 bool getCertifiedTimestampType(unsigned long idx, std::string& parameter) const;
153 bool getCertifiedTimestampType(DCMTree::TreePtr item, std::string& parameter) const;
154 std::string getCertifiedTimestampTypeTag() const { return "(0400,0305)"; }
155 bool setCertifiedTimestampType(unsigned long idx, std::string parameter);
156
157 // DigitalSignatureDateTime (0400,0105) vr=DT, vm=1, type=1
158 bool getDigitalSignatureDateTime(unsigned long idx, std::string& parameter) const;
159 bool getDigitalSignatureDateTime(DCMTree::TreePtr item, std::string& parameter) const;
160 std::string getDigitalSignatureDateTimeTag() const { return "(0400,0105)"; }
161 bool setDigitalSignatureDateTime(unsigned long idx, std::string parameter);
162
163 // DigitalSignatureUID (0400,0100) vr=UI, vm=1, type=1
164 bool getDigitalSignatureUID(unsigned long idx, std::string& parameter) const;
165 bool getDigitalSignatureUID(DCMTree::TreePtr item, std::string& parameter) const;
166 std::string getDigitalSignatureUIDTag() const { return "(0400,0100)"; }
167 bool setDigitalSignatureUID(unsigned long idx, std::string parameter);
168
169 // MACIDNumber (0400,0005) vr=US, vm=1, type=1
170 bool getMACIDNumber(unsigned long idx, MLuint16& parameter) const;
172 std::string getMACIDNumberTag() const { return "(0400,0005)"; }
173 bool setMACIDNumber(unsigned long idx, MLuint16 parameter);
174
175 // Signature (0400,0120) vr=OB, vm=1, type=1
176 bool getSignature(unsigned long idx, int& parameter) const;
177 bool getSignature(DCMTree::TreePtr item, int& parameter) const;
178 std::string getSignatureTag() const { return "(0400,0120)"; }
179 bool setSignature(unsigned long idx, int parameter);
180
181 // DigitalSignaturePurposeCodeSequence (0400,0401) vr=SQ, vm=1, type=3
183 std::string getDigitalSignaturePurposeCodeSequenceTag() const { return std::string("(0400,0401)"); }
185
186
189 void setSequence(std::vector<DcmDRTDigitalSignaturesSequenceInterface::Item> dcmSequence) {
190 _itemVec = dcmSequence;
191 }
192
195 std::vector<DcmDRTDigitalSignaturesSequenceInterface::Item> getSequence() const {
196 return _itemVec;
197 }
198
201 bool hasSequence() const {
202 return (_itemVec.size() != 0);
203 }
204
208 return static_cast<MLint>(_itemVec.size());
209 }
210
214 if (_itemVec.size() > idx) {
215 return _itemVec[idx];
216 }
218 }
219
224 return _itemVec[_itemVec.size()-1];
225 }
226
230
233 bool insertItem(const size_t idx) {
234 if (_itemVec.size() > idx) {
235 std::vector<DcmDRTDigitalSignaturesSequenceInterface::Item>::iterator it = _itemVec.begin();
236 std::advance(it, idx);
238 return true;
239 }
240 return false;
241 }
242
245 bool removeItem(const size_t idx) {
246 if ( _itemVec.size() > idx ) {
247 std::vector<DcmDRTDigitalSignaturesSequenceInterface::Item>::iterator it = _itemVec.begin();
248 std::advance(it, idx);
249 _itemVec.erase(it);
250 return true;
251 }
252 return false;
253 }
254
255 protected:
257 std::vector<DcmDRTDigitalSignaturesSequenceInterface::Item> _itemVec;
258};
259
261
262#endif // __mlDcmDRTDigitalSignaturesSequenceInterface_H
263
264/* MeVis-Hidden-Components-Start */
265/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTDigitalSignaturePurposeCodeSequence.
DcmDRTDigitalSignaturePurposeCodeSequenceInterface getDigitalSignaturePurposeCodeSequence() const
bool setDigitalSignatureUID(std::string parameter)
void setDigitalSignaturePurposeCodeSequence(DcmDRTDigitalSignaturePurposeCodeSequenceInterface seq)
bool getDigitalSignatureUID(std::string &parameter) const
bool getDigitalSignatureDateTime(std::string &parameter) const
bool setDigitalSignatureDateTime(std::string parameter)
bool getCertifiedTimestampType(std::string &parameter) const
bool getCertificateType(std::string &parameter) const
bool getMACIDNumber(MLuint16 &parameter) const
bool setCertifiedTimestampType(std::string parameter)
Class to provide access to DRTDigitalSignaturesSequence.
bool getCertifiedTimestampType(unsigned long idx, std::string &parameter) const
bool getCertificateType(unsigned long idx, std::string &parameter) const
DcmDRTDigitalSignaturePurposeCodeSequenceInterface getDigitalSignaturePurposeCodeSequence(unsigned long idx) const
void setDigitalSignaturePurposeCodeSequence(DcmDRTDigitalSignaturePurposeCodeSequenceInterface seq, unsigned long idx)
bool getCertifiedTimestamp(unsigned long idx, int &parameter) const
bool setSignature(unsigned long idx, int parameter)
bool setDigitalSignatureUID(unsigned long idx, std::string parameter)
bool setCertifiedTimestamp(unsigned long idx, int parameter)
bool getSignature(unsigned long idx, int &parameter) const
bool getDigitalSignatureDateTime(DCMTree::TreePtr item, std::string &parameter) const
bool getCertificateOfSigner(DCMTree::TreePtr item, int &parameter) const
bool getCertifiedTimestamp(DCMTree::TreePtr item, int &parameter) const
bool getDigitalSignatureDateTime(unsigned long idx, std::string &parameter) const
void setSequence(std::vector< DcmDRTDigitalSignaturesSequenceInterface::Item > dcmSequence)
Set the DRTDigitalSignaturesSequence this interface class provides access to.
bool getDigitalSignatureUID(unsigned long idx, std::string &parameter) const
bool setCertificateType(unsigned long idx, std::string parameter)
bool getDigitalSignatureUID(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTDigitalSignaturesSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
std::vector< DcmDRTDigitalSignaturesSequenceInterface::Item > getSequence() const
Return the DRTDigitalSignaturesSequence this interface class provides access to.
bool hasSequence() const
Check if the DRTDigitalSignaturesSequence is set.
bool getMACIDNumber(DCMTree::TreePtr item, MLuint16 &parameter) const
bool getSignature(DCMTree::TreePtr item, int &parameter) const
bool getCertifiedTimestampType(DCMTree::TreePtr item, std::string &parameter) const
DcmDRTDigitalSignaturesSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool setCertificateOfSigner(unsigned long idx, int parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getCertificateOfSigner(unsigned long idx, int &parameter) const
DcmDRTDigitalSignaturesSequenceInterface(std::vector< DcmDRTDigitalSignaturesSequenceInterface::Item > dcmSequence)
Default Constructor.
bool setCertifiedTimestampType(unsigned long idx, std::string parameter)
bool getMACIDNumber(unsigned long idx, MLuint16 &parameter) const
bool setMACIDNumber(unsigned long idx, MLuint16 parameter)
bool setDigitalSignatureDateTime(unsigned long idx, std::string parameter)
void addItem(DcmDRTDigitalSignaturesSequenceInterface::Item newItem)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
std::vector< DcmDRTDigitalSignaturesSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getCertificateType(DCMTree::TreePtr item, std::string &parameter) const
Class to provide access to DRTDigitalSignaturePurposeCodeSequence.
Class collecting some DICOM helper functionality explicitly for dcmtk.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
unsigned short MLuint16
Definition mlTypeDefs.h:142
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