Odil
A C++11 library for the DICOM standard
|
Go to the documentation of this file.
9 #ifndef _dfa4858b_1c9d_4ce9_b220_a1c15d873602
10 #define _dfa4858b_1c9d_4ce9_b220_a1c15d873602
14 #include <dcmtk/config/osconfig.h>
15 #include <dcmtk/dcmdata/dcelem.h>
16 #include <dcmtk/dcmdata/dcdatset.h>
29 template<
typename TValueType>
30 struct ElementAccessor
36 typedef std::function<
43 typedef std::function<
50 static bool has(DcmDataset
const & dataset, DcmTagKey
const & tag);
54 DcmDataset
const & dataset,
55 DcmTagKey
const tag,
unsigned int const position=0);
60 DcmTagKey
const tag,
ValueType const & value,
unsigned int const position=0);
67 #include "odil/dcmtk/ElementAccessor.txx"
69 #endif // _dfa4858b_1c9d_4ce9_b220_a1c15d873602
Definition: Association.h:23
#define ODIL_API
Definition: odil.h:27
static const GetterType element_get
Return the value in the element.
Definition: ElementAccessor.h:54
static const SetterType element_set
Set the value in the element.
Definition: ElementAccessor.h:61
static void set(DcmDataset &dataset, DcmTagKey const tag, ValueType const &value, unsigned int const position=0)
Set the value of an element in a dataset.
TValueType ValueType
C++ type of the VR.
Definition: ElementAccessor.h:47
std::function< ValueType(DcmElement const &, unsigned long const)> GetterType
Getter type.
Definition: ElementAccessor.h:51
static ValueType get(DcmDataset const &dataset, DcmTagKey const tag, unsigned int const position=0)
Return the value of an element in a dataset.
static bool has(DcmDataset const &dataset, DcmTagKey const &tag)
Test whether the data set contains a given tag.
std::function< void(DcmElement &, ValueType const &, unsigned long const)> SetterType
Setter type.
Definition: ElementAccessor.h:58