Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
odil::dcmtk::ElementAccessor< TValueType > Struct Template Reference

Generic access to values in DcmElement. More...

#include <ElementAccessor.h>

Public Types

typedef TValueType ValueType
 C++ type of the VR.
typedef std::function< ValueType(DcmElement const &, unsigned long const)> GetterType
 Getter type.
typedef std::function< void(DcmElement &, ValueType const &, unsigned long const)> SetterType
 Setter type.

Static Public Member Functions

static bool has (DcmDataset const &dataset, DcmTagKey const &tag)
 Test whether the data set contains a given tag.
static ValueType get (DcmDataset const &dataset, DcmTagKey const tag, unsigned int const position=0)
 Return the value of an element in a dataset.
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.

Static Public Attributes

static GetterType const element_get
 Return the value in the element.
static SetterType const element_set
 Set the value in the element.

Detailed Description

template<typename TValueType>
struct odil::dcmtk::ElementAccessor< TValueType >

Generic access to values in DcmElement.

Member Typedef Documentation

◆ GetterType

template<typename TValueType>
typedef std::function< ValueType(DcmElement const &, unsigned long const)> odil::dcmtk::ElementAccessor< TValueType >::GetterType

Getter type.

◆ SetterType

template<typename TValueType>
typedef std::function< void(DcmElement &, ValueType const &, unsigned long const)> odil::dcmtk::ElementAccessor< TValueType >::SetterType

Setter type.

◆ ValueType

template<typename TValueType>
typedef TValueType odil::dcmtk::ElementAccessor< TValueType >::ValueType

C++ type of the VR.

Member Function Documentation

◆ get()

template<typename TValueType>
ValueType odil::dcmtk::ElementAccessor< TValueType >::get ( DcmDataset const & dataset,
DcmTagKey const tag,
unsigned int const position = 0 )
static

Return the value of an element in a dataset.

◆ has()

template<typename TValueType>
bool odil::dcmtk::ElementAccessor< TValueType >::has ( DcmDataset const & dataset,
DcmTagKey const & tag )
static

Test whether the data set contains a given tag.

◆ set()

template<typename TValueType>
void odil::dcmtk::ElementAccessor< TValueType >::set ( DcmDataset & dataset,
DcmTagKey const tag,
ValueType const & value,
unsigned int const position = 0 )
static

Set the value of an element in a dataset.

Member Data Documentation

◆ element_get

template<typename TValueType>
GetterType const odil::dcmtk::ElementAccessor< TValueType >::element_get
static

Return the value in the element.

◆ element_set

template<typename TValueType>
SetterType const odil::dcmtk::ElementAccessor< TValueType >::element_set
static

Set the value in the element.


The documentation for this struct was generated from the following file: