Odil
A C++11 library for the DICOM standard
|
Element of a DICOM data set. More...
#include <Element.h>
Public Member Functions | |
Element (VR const &vr) | |
Constructor using the VR to create an according empty container. More... | |
Element (Value const &value, VR const &vr) | |
Constructor. More... | |
Element (Value &&value, VR const &vr) | |
Constructor. More... | |
ODIL_ELEMENT_CONSTRUCTORS (Integers) | |
ODIL_ELEMENT_CONSTRUCTORS (Reals) | |
ODIL_ELEMENT_CONSTRUCTORS (Strings) | |
ODIL_ELEMENT_CONSTRUCTORS (DataSets) | |
ODIL_ELEMENT_CONSTRUCTORS (Binary) | |
Element (std::initializer_list< int > const &value, VR const &vr=VR::INVALID) | |
Element (std::initializer_list< std::initializer_list< uint8_t >> const &value, VR const &vr=VR::INVALID) | |
~Element ()=default | |
Element (Element const &)=default | |
Element (Element &&)=default | |
Element & | operator= (Element const &)=default |
Element & | operator= (Element &&)=default |
bool | empty () const |
Test whether the element is empty. More... | |
std::size_t | size () const |
Return the number of items in the value. More... | |
Value & | get_value () |
Return the raw value. More... | |
const Value & | get_value () const |
Return the raw value. More... | |
bool | is_int () const |
Test whether the value contains integers. More... | |
const Value::Integers & | as_int () const |
Return the integers contained in the element. More... | |
Value::Integers & | as_int () |
Return the integers contained in the element. More... | |
bool | is_real () const |
Test whether the value contains reals. More... | |
const Value::Reals & | as_real () const |
Return the reals contained in the element. More... | |
Value::Reals & | as_real () |
Return the reals contained in the element. More... | |
bool | is_string () const |
Test whether the value contains strings. More... | |
const Value::Strings & | as_string () const |
Return the strings contained in the element. More... | |
Value::Strings & | as_string () |
Return the strings contained in the element. More... | |
bool | is_data_set () const |
Test whether the value contains data sets. More... | |
const Value::DataSets & | as_data_set () const |
Return the data sets contained in the element. More... | |
Value::DataSets & | as_data_set () |
Return the data sets contained in the element. More... | |
bool | is_binary () const |
Test whether the value contains data sets. More... | |
const Value::Binary & | as_binary () const |
Return the binary data contained in the element. More... | |
Value::Binary & | as_binary () |
Return the binary data contained in the element. More... | |
bool | operator== (Element const &other) const |
Equality test. More... | |
bool | operator!= (Element const &other) const |
Difference test. More... | |
void | clear () |
Clear the element (element.empty() will be true). More... | |
Public Attributes | |
VR | vr |
VR of the element. More... | |
Element of a DICOM data set.
odil::Element::Element | ( | VR const & | vr | ) |
Constructor using the VR to create an according empty container.
odil::Element::Element | ( | std::initializer_list< int > const & | value, |
VR const & | vr = VR::INVALID |
||
) |
odil::Element::Element | ( | std::initializer_list< std::initializer_list< uint8_t >> const & | value, |
VR const & | vr = VR::INVALID |
||
) |
Value::Binary& odil::Element::as_binary | ( | ) |
Return the binary data contained in the element.
If the element does not contain binary data, a odil::Exception is raised.
const Value::Binary& odil::Element::as_binary | ( | ) | const |
Return the binary data contained in the element.
If the element does not contain binary data, a odil::Exception is raised.
Value::DataSets& odil::Element::as_data_set | ( | ) |
Return the data sets contained in the element.
If the element does not contain data sets, a odil::Exception is raised.
const Value::DataSets& odil::Element::as_data_set | ( | ) | const |
Return the data sets contained in the element.
If the element does not contain data sets, a odil::Exception is raised.
Value::Integers& odil::Element::as_int | ( | ) |
Return the integers contained in the element.
If the element does not contain integers, a odil::Exception is raised.
const Value::Integers& odil::Element::as_int | ( | ) | const |
Return the integers contained in the element.
If the element does not contain integers, a odil::Exception is raised.
Value::Reals& odil::Element::as_real | ( | ) |
Return the reals contained in the element.
If the element does not contain reals, a odil::Exception is raised.
const Value::Reals& odil::Element::as_real | ( | ) | const |
Return the reals contained in the element.
If the element does not contain reals, a odil::Exception is raised.
Value::Strings& odil::Element::as_string | ( | ) |
Return the strings contained in the element.
If the element does not contain strings, a odil::Exception is raised.
const Value::Strings& odil::Element::as_string | ( | ) | const |
Return the strings contained in the element.
If the element does not contain strings, a odil::Exception is raised.
void odil::Element::clear | ( | ) |
Clear the element (element.empty() will be true).
bool odil::Element::empty | ( | ) | const |
Test whether the element is empty.
Value& odil::Element::get_value | ( | ) |
Return the raw value.
const Value& odil::Element::get_value | ( | ) | const |
Return the raw value.
bool odil::Element::is_binary | ( | ) | const |
Test whether the value contains data sets.
bool odil::Element::is_data_set | ( | ) | const |
Test whether the value contains data sets.
bool odil::Element::is_int | ( | ) | const |
Test whether the value contains integers.
bool odil::Element::is_real | ( | ) | const |
Test whether the value contains reals.
bool odil::Element::is_string | ( | ) | const |
Test whether the value contains strings.
odil::Element::ODIL_ELEMENT_CONSTRUCTORS | ( | Binary | ) |
odil::Element::ODIL_ELEMENT_CONSTRUCTORS | ( | DataSets | ) |
odil::Element::ODIL_ELEMENT_CONSTRUCTORS | ( | Integers | ) |
odil::Element::ODIL_ELEMENT_CONSTRUCTORS | ( | Reals | ) |
odil::Element::ODIL_ELEMENT_CONSTRUCTORS | ( | Strings | ) |
bool odil::Element::operator!= | ( | Element const & | other | ) | const |
Difference test.
bool odil::Element::operator== | ( | Element const & | other | ) | const |
Equality test.
std::size_t odil::Element::size | ( | ) | const |
Return the number of items in the value.
VR odil::Element::vr |
VR of the element.