9 #ifndef _dca5b15b_b8df_4925_a446_d42efe06c923 10 #define _dca5b15b_b8df_4925_a446_d42efe06c923 13 #include <initializer_list> 18 #include "odil/odil.h" 54 typedef std::vector<Real>
Reals;
63 typedef std::vector<std::vector<uint8_t>>
Binary;
65 #define ODIL_VALUE_CONSTRUCTORS(type) \ 66 Value(type const & value); \ 67 Value(type && value); \ 68 Value(std::initializer_list<type::value_type> const & value); 74 ODIL_VALUE_CONSTRUCTORS(Integers);
75 ODIL_VALUE_CONSTRUCTORS(Reals);
76 ODIL_VALUE_CONSTRUCTORS(Strings);
77 ODIL_VALUE_CONSTRUCTORS(DataSets);
78 ODIL_VALUE_CONSTRUCTORS(Binary);
79 #undef ODIL_VALUE_CONSTRUCTORS 81 Value(std::initializer_list<int>
const & value);
83 Value(std::initializer_list<std::initializer_list<uint8_t>>
const & value);
96 Type get_type()
const;
102 std::size_t size()
const;
109 Integers
const & as_integers()
const;
116 Integers & as_integers();
123 Reals
const & as_reals()
const;
137 Strings
const & as_strings()
const;
144 Strings & as_strings();
151 DataSets
const & as_data_sets()
const;
158 DataSets & as_data_sets();
165 Binary
const & as_binary()
const;
172 Binary & as_binary();
175 bool operator==(
Value const & other)
const;
178 bool operator!=(
Value const & other)
const;
189 std::shared_ptr<DataSets> _data_sets;
198 template<
typename TVisitor>
199 typename TVisitor::result_type
200 apply_visitor(TVisitor
const & visitor,
Value const & value);
205 template<
typename TVisitor>
206 typename TVisitor::result_type
207 apply_visitor(TVisitor
const & visitor,
Value & value);
211 #include "odil/Value.txx" 213 #endif // _dca5b15b_b8df_4925_a446_d42efe06c923 std::vector< String > Strings
String container.
Definition: Value.h:57
std::vector< Real > Reals
Real container.
Definition: Value.h:54
A value held in a DICOM element.
Definition: Value.h:28
Type
Possible types stored in the value.
Definition: Value.h:32
double Real
Real type.
Definition: Value.h:45
Definition: Association.cpp:39
std::string String
String type.
Definition: Value.h:48
std::vector< Integer > Integers
Integer container.
Definition: Value.h:51
std::vector< DataSet > DataSets
Data sets container.
Definition: Value.h:60
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:63
int64_t Integer
Integer type.
Definition: Value.h:42