odil
Public Types | Public Member Functions | List of all members
odil::DataSet Class Reference

DICOM Data set. More...

#include <DataSet.h>

Public Types

typedef std::map< Tag, Element >::const_iterator const_iterator
 

Public Member Functions

 DataSet ()
 Create an empty data set.
 
void add (Tag const &tag, Element const &element)
 Add an element to the dataset.
 
void add (Tag const &tag, VR vr=VR::UNKNOWN)
 Add an empty element to the dataset.
 
void add (Tag const &tag, Value::Integers const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, Value::Reals const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, Value::Strings const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, Value::DataSets const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, Value::Binary const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, std::initializer_list< int > const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, std::initializer_list< Value::Integer > const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, std::initializer_list< Value::Real > const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, std::initializer_list< Value::String > const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void add (Tag const &tag, std::initializer_list< DataSet > const &value, VR vr=VR::UNKNOWN)
 Add an element to the dataset.
 
void remove (Tag const &tag)
 Remove an element from the data set. More...
 
bool empty () const
 Test whether the data set is empty.
 
std::size_t size () const
 Return the number of elements in the data set.
 
bool has (Tag const &tag) const
 Test whether an element is in the data set.
 
VR get_vr (Tag const &tag) const
 Return the VR of an element in the data set. More...
 
bool empty (Tag const &tag) const
 Test whether an element of the data set is empty. More...
 
std::size_t size (Tag const &tag) const
 Return the number of values in an element of the data set. More...
 
Element const & operator[] (Tag const &tag) const
 Access the given element. More...
 
Elementoperator[] (Tag const &tag)
 Access the given element. More...
 
bool is_int (Tag const &tag) const
 
Value::Integers const & as_int (Tag const &tag) const
 
Value::Integers::value_type const & as_int (Tag const &tag, unsigned int position) const
 
Value::Integersas_int (Tag const &tag)
 
bool is_real (Tag const &tag) const
 
Value::Reals const & as_real (Tag const &tag) const
 
Value::Reals::value_type const & as_real (Tag const &tag, unsigned int position) const
 
Value::Realsas_real (Tag const &tag)
 
bool is_string (Tag const &tag) const
 
Value::Strings const & as_string (Tag const &tag) const
 
Value::Strings::value_type const & as_string (Tag const &tag, unsigned int position) const
 
Value::Stringsas_string (Tag const &tag)
 
bool is_data_set (Tag const &tag) const
 
Value::DataSets const & as_data_set (Tag const &tag) const
 
Value::DataSets::value_type const & as_data_set (Tag const &tag, unsigned int position) const
 
Value::DataSetsas_data_set (Tag const &tag)
 
bool is_binary (Tag const &tag) const
 
Value::Binary const & as_binary (Tag const &tag) const
 
Value::Binary::value_type const & as_binary (Tag const &tag, unsigned int position) const
 
Value::Binaryas_binary (Tag const &tag)
 
const_iterator begin () const
 
const_iterator end () const
 
bool operator== (DataSet const &other) const
 Equality test.
 
bool operator!= (DataSet const &other) const
 Difference test.
 

Detailed Description

DICOM Data set.

Member Function Documentation

bool odil::DataSet::empty ( Tag const &  tag) const

Test whether an element of the data set is empty.

If the element is not in the data set, a odil::Exception is raised.

VR odil::DataSet::get_vr ( Tag const &  tag) const

Return the VR of an element in the data set.

If the element is not in the data set, a odil::Exception is raised.

Element const & odil::DataSet::operator[] ( Tag const &  tag) const

Access the given element.

If the element is not in the data set, a odil::Exception is raised.

Element & odil::DataSet::operator[] ( Tag const &  tag)

Access the given element.

If the element is not in the data set, a odil::Exception is raised.

void odil::DataSet::remove ( Tag const &  tag)

Remove an element from the data set.

If the element is not in the data set, a odil::Exception is raised.

std::size_t odil::DataSet::size ( Tag const &  tag) const

Return the number of values in an element of the data set.

If the element is not in the data set, a odil::Exception is raised.


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