Odil
A C++11 library for the DICOM standard
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 {
  Type::Integers, Type::Reals, Type::Strings, Type::DataSets,
  Type::Binary
}
 Possible types stored in the value. More...
 
typedef int64_t Integer
 Integer type. More...
 
typedef double Real
 Real type. More...
 
typedef std::string String
 String type. More...
 
typedef std::vector< IntegerIntegers
 Integer container. More...
 
typedef std::vector< RealReals
 Real container. More...
 
typedef std::vector< StringStrings
 String container. More...
 
typedef std::vector< std::shared_ptr< DataSet > > DataSets
 Data sets container. More...
 
typedef std::vector< std::vector< uint8_t > > Binary
 Binary data container. More...
 

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 ()=default
 
 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. More...
 
bool empty () const
 Test whether the value is empty. More...
 
std::size_t size () const
 Return the number of items. More...
 
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. More...
 
bool operator!= (Value const &other) const
 Difference test. More...
 
void clear ()
 Clear the value (value.empty() will be true). More...
 

Detailed Description

A value held in a DICOM element.

Member Typedef Documentation

◆ Binary

typedef std::vector<std::vector<uint8_t> > odil::Value::Binary

Binary data container.

◆ DataSets

typedef std::vector<std::shared_ptr<DataSet> > odil::Value::DataSets

Data sets container.

◆ Integer

typedef int64_t odil::Value::Integer

Integer type.

◆ Integers

typedef std::vector<Integer> odil::Value::Integers

Integer container.

◆ Real

typedef double odil::Value::Real

Real type.

◆ Reals

typedef std::vector<Real> odil::Value::Reals

Real container.

◆ String

typedef std::string odil::Value::String

String type.

◆ Strings

typedef std::vector<String> odil::Value::Strings

String container.

Member Enumeration Documentation

◆ Type

enum odil::Value::Type
strong

Possible types stored in the value.

Enumerator
Integers 
Reals 
Strings 
DataSets 
Binary 

Constructor & Destructor Documentation

◆ Value() [1/17]

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

◆ Value() [2/17]

odil::Value::Value ( Integers &&  value)

◆ Value() [3/17]

odil::Value::Value ( std::initializer_list< Integers ::value_type > const &  value)

◆ Value() [4/17]

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

◆ Value() [5/17]

odil::Value::Value ( Reals &&  value)

◆ Value() [6/17]

odil::Value::Value ( std::initializer_list< Reals ::value_type > const &  value)

◆ Value() [7/17]

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

◆ Value() [8/17]

odil::Value::Value ( Strings &&  value)

◆ Value() [9/17]

odil::Value::Value ( std::initializer_list< Strings ::value_type > const &  value)

◆ Value() [10/17]

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

◆ Value() [11/17]

odil::Value::Value ( DataSets &&  value)

◆ Value() [12/17]

odil::Value::Value ( std::initializer_list< DataSets ::value_type > const &  value)

◆ Value() [13/17]

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

◆ Value() [14/17]

odil::Value::Value ( Binary &&  value)

◆ Value() [15/17]

odil::Value::Value ( std::initializer_list< Binary ::value_type > const &  value)

◆ Value() [16/17]

odil::Value::Value ( std::initializer_list< int > const &  value)

◆ Value() [17/17]

odil::Value::Value ( std::initializer_list< std::initializer_list< uint8_t >> const &  value)

Member Function Documentation

◆ as_binary() [1/2]

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]

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]

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]

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]

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]

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]

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]

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]

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]

Strings& odil::Value::as_strings ( )

Return the strings contained in the value.

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

◆ clear()

void odil::Value::clear ( )

Clear the value (value.empty() will be true).

◆ empty()

bool odil::Value::empty ( ) const

Test whether the value is empty.

◆ get_type()

Type odil::Value::get_type ( ) const

Return the type store in the value.

◆ operator!=()

bool odil::Value::operator!= ( Value const &  other) const

Difference test.

◆ operator==()

bool odil::Value::operator== ( Value const &  other) const

Equality test.

◆ size()

std::size_t odil::Value::size ( ) const

Return the number of items.


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