9#ifndef _9c3d8f32_0310_4e3a_b5d2_6d69f229a2cf
10#define _9c3d8f32_0310_4e3a_b5d2_6d69f229a2cf
13#include <initializer_list>
42#define ODIL_ELEMENT_CONSTRUCTORS(type) \
43 Element(Value::type const & value, VR const & vr=VR::INVALID); \
44 Element(Value::type && value, VR const & vr=VR::INVALID); \
46 std::initializer_list<Value::type::value_type> const & value, \
47 VR const & vr=VR::INVALID);
58#undef ODIL_ELEMENT_CONSTRUCTORS
61 std::initializer_list<int>
const & value,
VR const & vr=
VR::INVALID);
64 std::initializer_list<std::initializer_list<uint8_t>>
const & value,
190template<
typename TVisitor>
191typename TVisitor::result_type
197#include "odil/Element.txx"
#define ODIL_ELEMENT_CONSTRUCTORS(type)
Definition: Element.h:42
Element of a DICOM data set.
Definition: Element.h:27
Value::DataSets const & as_data_set() const
Return the data sets contained in the element.
Value & get_value()
Return the raw value.
bool is_real() const
Test whether the value contains reals.
Value::Strings const & as_string() const
Return the strings contained in the element.
VR vr
VR of the element.
Definition: Element.h:31
Value::Integers & as_int()
Return the integers contained in the element.
std::size_t size() const
Return the number of items in the value.
Element(std::initializer_list< std::initializer_list< uint8_t > > const &value, VR const &vr=VR::INVALID)
Value::Binary const & as_binary() const
Return the binary data contained in the element.
Value::Integers const & as_int() const
Return the integers contained in the element.
bool is_string() const
Test whether the value contains strings.
bool operator!=(Element const &other) const
Difference test.
Value::DataSets & as_data_set()
Return the data sets contained in the element.
void clear()
Clear the element (element.empty() will be true).
Value::Reals const & as_real() const
Return the reals contained in the element.
bool empty() const
Test whether the element is empty.
Value::Reals & as_real()
Return the reals contained in the element.
Element(Value &&value, VR const &vr)
Constructor.
bool is_data_set() const
Test whether the value contains data sets.
Element(std::initializer_list< int > const &value, VR const &vr=VR::INVALID)
bool operator==(Element const &other) const
Equality test.
Value::Binary & as_binary()
Return the binary data contained in the element.
Value::Strings & as_string()
Return the strings contained in the element.
bool is_binary() const
Test whether the value contains data sets.
Value const & get_value() const
Return the raw value.
Element(VR const &vr)
Constructor using the VR to create an according empty container.
bool is_int() const
Test whether the value contains integers.
Element(Value const &value, VR const &vr)
Constructor.
A value held in a DICOM element.
Definition: Value.h:29
std::vector< String > Strings
String container.
Definition: Value.h:57
std::vector< Integer > Integers
Integer container.
Definition: Value.h:51
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:63
std::vector< Real > Reals
Real container.
Definition: Value.h:54
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition: Value.h:60
Element(Element &&)=default
Element(Element const &)=default
Element & operator=(Element const &)=default
Element & operator=(Element &&)=default
Definition: Association.h:25
VR
Value representations of DICOM.
Definition: VR.h:23
TVisitor::result_type apply_visitor(TVisitor const &visitor, Element const &element)
Visitor of elements.
#define ODIL_API
Definition: odil.h:28