vega
Public Member Functions | List of all members
vega::dicom::Element< T > Class Template Reference

A useful wrapper class over the more standard DataElement. More...

#include <vega/dicom/element.h>

Public Member Functions

 Element ()
 
 Element (const Tag &tag)
 
 Element (const std::shared_ptr< DataElement > &data_element)
 
std::shared_ptr< typename T::manipulator_type > manipulator ()
 
const Tagtag () const
 
Tagtag ()
 
const VRvr () const
 
VRvr ()
 

Detailed Description

template<typename T>
class vega::dicom::Element< T >

A useful wrapper class over the more standard DataElement.

This is a template class, where the possible types are defined in vega/include/dictionary_data.h. This means that instead of needing to supply specific tags or VR, you can create a new element simply like

auto element = std::make_shared<vega::dicom::Element<vega::dictionary::PatientName>>();

and this element will already have the correct Tag, VR, and will have the correct manipulator of vega::PN_Manipulator built in.

Constructor & Destructor Documentation

◆ Element() [1/3]

template<typename T >
vega::dicom::Element< T >::Element ( )

Builds a new data element with the Tag and VR corresponding to the given type T. Note that it will fail if the type T does not define a unique Tag, such as vega::dictionary::CurveDimensions which has a range of tags (50xx,0005).

◆ Element() [2/3]

template<typename T >
vega::dicom::Element< T >::Element ( const Tag tag)
explicit

Builds a new data element with the given tag, and VR corresponding to the given type T. Note that this will fail if the given tag does not agree with the TagMask of type T.

◆ Element() [3/3]

template<typename T >
vega::dicom::Element< T >::Element ( const std::shared_ptr< DataElement< T > > &  data_element)
explicit

Builds a new Element that wraps the given data_element. Will raise an error if the given type T's Tag or VR does not agree with the DataElement.

Member Function Documentation

◆ manipulator()

template<typename T >
std::shared_ptr< typename T::manipulator_type > vega::dicom::Element< T >::manipulator ( )
Returns
a pointer to the manipulator for this Element.

◆ tag() [1/2]

template<typename T >
const Tag & vega::dicom::Element< T >::tag ( ) const

◆ tag() [2/2]

template<typename T >
Tag & vega::dicom::Element< T >::tag ( )

◆ vr() [1/2]

template<typename T >
const VR & vega::dicom::Element< T >::vr ( ) const

◆ vr() [2/2]

template<typename T >
VR & vega::dicom::Element< T >::vr ( )

The documentation for this class was generated from the following files: