odil
C++11libraryfortheDICOMstandard
Public Types | Public Member Functions | List of all members
odil::Value Class Reference

A value held in a DICOM element. More...

#include <Value.h>

Public Types

enum  Type {
  Integers, Reals, Strings, DataSets,
  Binary
}
 Possible types stored in the value.
 
typedef int64_t Integer
 Integer type.
 
typedef double Real
 Real type.
 
typedef std::string String
 String type.
 
typedef std::vector< IntegerIntegers
 Integer container.
 
typedef std::vector< RealReals
 Real container.
 
typedef std::vector< StringStrings
 String container.
 
typedef std::vector< DataSetDataSets
 Data sets container.
 
typedef std::vector< std::vector< uint8_t > > Binary
 Binary data container.
 

Public Member Functions

 Value (Integers const &value)
 
 Value (Integers &&value)
 
 Value (std::initializer_list< Integers ::value_type > const &value)
 
 Value (Reals const &value)
 
 Value (Reals &&value)
 
 Value (std::initializer_list< Reals ::value_type > const &value)
 
 Value (Strings const &value)
 
 Value (Strings &&value)
 
 Value (std::initializer_list< Strings ::value_type > const &value)
 
 Value (DataSets const &value)
 
 Value (DataSets &&value)
 
 Value (std::initializer_list< DataSets ::value_type > const &value)
 
 Value (Binary const &value)
 
 Value (Binary &&value)
 
 Value (std::initializer_list< Binary ::value_type > const &value)
 
 Value (std::initializer_list< int > const &value)
 
 Value (std::initializer_list< std::initializer_list< uint8_t >> const &value)
 
 Value (Value const &)=default
 
 Value (Value &&)=default
 
Valueoperator= (Value const &)=default
 
Valueoperator= (Value &&)=default
 
Type get_type () const
 Return the type store in the value.
 
bool empty () const
 Test whether the value is empty.
 
std::size_t size () const
 Return the number of items.
 
Integers const & as_integers () const
 Return the integers contained in the value. More...
 
Integersas_integers ()
 Return the integers contained in the value. More...
 
Reals const & as_reals () const
 Return the reals contained in the value. More...
 
Realsas_reals ()
 Return the reals contained in the value. More...
 
Strings const & as_strings () const
 Return the strings contained in the value. More...
 
Stringsas_strings ()
 Return the strings contained in the value. More...
 
DataSets const & as_data_sets () const
 Return the data sets contained in the value. More...
 
DataSetsas_data_sets ()
 Return the data sets contained in the value. More...
 
Binary const & as_binary () const
 Return the binary data contained in the value. More...
 
Binaryas_binary ()
 Return the binary data contained in the value. More...
 
bool operator== (Value const &other) const
 Equality test.
 
bool operator!= (Value const &other) const
 Difference test.
 
void clear ()
 Clear the value (value.empty() will be true).
 

Detailed Description

A value held in a DICOM element.

Member Function Documentation

◆ as_binary() [1/2]

Value::Binary const & odil::Value::as_binary ( ) const

Return the binary data contained in the value.

If the value does not contain binary data, a odil::Exception is raised.

◆ as_binary() [2/2]

Value::Binary & odil::Value::as_binary ( )

Return the binary data contained in the value.

If the value does not contain binary data, a odil::Exception is raised.

◆ as_data_sets() [1/2]

Value::DataSets const & odil::Value::as_data_sets ( ) const

Return the data sets contained in the value.

If the value does not contain data sets, a odil::Exception is raised.

◆ as_data_sets() [2/2]

Value::DataSets & odil::Value::as_data_sets ( )

Return the data sets contained in the value.

If the value does not contain data sets, a odil::Exception is raised.

◆ as_integers() [1/2]

Value::Integers const & odil::Value::as_integers ( ) const

Return the integers contained in the value.

If the value does not contain integers, a odil::Exception is raised.

◆ as_integers() [2/2]

Value::Integers & odil::Value::as_integers ( )

Return the integers contained in the value.

If the value does not contain integers, a odil::Exception is raised.

◆ as_reals() [1/2]

Value::Reals const & odil::Value::as_reals ( ) const

Return the reals contained in the value.

If the value does not contain reals, a odil::Exception is raised.

◆ as_reals() [2/2]

Value::Reals & odil::Value::as_reals ( )

Return the reals contained in the value.

If the value does not contain reals, a odil::Exception is raised.

◆ as_strings() [1/2]

Value::Strings const & odil::Value::as_strings ( ) const

Return the strings contained in the value.

If the value does not contain strings, a odil::Exception is raised.

◆ as_strings() [2/2]

Value::Strings & odil::Value::as_strings ( )

Return the strings contained in the value.

If the value does not contain strings, a odil::Exception is raised.


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