Odil
A C++11 library for the DICOM standard
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
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. More...
 
typedef std::function< ValueType(DcmElement const &, unsigned long const)> GetterType
 Getter type. More...
 
typedef std::function< void(DcmElement &, ValueType const &, unsigned long const)> SetterType
 Setter type. More...
 

Static Public Member Functions

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

Static Public Attributes

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

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 >
static 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 >
static 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 >
static 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 >
const GetterType odil::dcmtk::ElementAccessor< TValueType >::element_get
static

Return the value in the element.

◆ element_set

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

Set the value in the element.


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