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,
71 Element(Element
const &) =
default;
72 Element(Element &&) =
default;
73 Element & operator=(Element
const &) =
default;
74 Element & operator=(Element &&) =
default;
81 std::size_t size()
const;
84 Value
const & get_value()
const;
138 bool is_data_set()
const;
172 bool operator==(Element
const & other)
const;
175 bool operator!=(Element
const & other)
const;
187 template<
typename TVisitor>
188 typename TVisitor::result_type
189 apply_visitor(TVisitor
const & visitor, Element
const & element);
194 #include "odil/Element.txx" 196 #endif // _9c3d8f32_0310_4e3a_b5d2_6d69f229a2cf std::vector< String > Strings
String container.
Definition: Value.h:57
std::vector< Real > Reals
Real container.
Definition: Value.h:54
#define ODIL_ELEMENT_CONSTRUCTORS(type)
Definition: Element.h:42
bool is_string(VR vr)
Test whether a VR contains text.
bool is_real(VR vr)
Test whether a VR contains rel numbers.
std::vector< DataSet > DataSets
Data sets container.
Definition: Value.h:60
Element of a DICOM data set.
Definition: Element.h:26
Definition: Association.h:24
#define ODIL_API
Definition: odil.h:28
bool is_int(VR vr)
Test whether a VR contains integers.
TVisitor::result_type apply_visitor(TVisitor const &visitor, Element const &element)
Visitor of elements.
bool is_binary(VR vr)
Test whether a VR contains binary data.
VR vr
VR of the element.
Definition: Element.h:31
std::vector< Integer > Integers
Integer container.
Definition: Value.h:51
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:63
A value held in a DICOM element.
Definition: Value.h:28
VR
Value representations of DICOM.
Definition: VR.h:22
std::string as_string(VR vr)
Convert a VR to its string representation.