9 #ifndef _8424446e_1153_4acc_9f57_e86faa7246e3 10 #define _8424446e_1153_4acc_9f57_e86faa7246e3 14 #include <initializer_list> 19 #include "odil/Element.h" 20 #include "odil/odil.h" 21 #include "odil/Value.h" 33 explicit DataSet(std::string
const & transfer_syntax=
"");
46 void add(
Tag const & tag,
Element const & element);
52 void add(
Tag const & tag, VR vr=VR::UNKNOWN);
54 #define ODIL_DATASET_ADD(type) \ 56 Tag const & tag, Value::type const & value, VR vr=VR::UNKNOWN);\ 58 Tag const & tag, Value::type && value, VR vr=VR::UNKNOWN); \ 61 std::initializer_list<Value::type::value_type> const & value, \ 68 ODIL_DATASET_ADD(Integers);
69 ODIL_DATASET_ADD(Reals);
70 ODIL_DATASET_ADD(Strings);
71 ODIL_DATASET_ADD(DataSets);
72 ODIL_DATASET_ADD(Binary);
73 #undef ODIL_DATASET_ADD 77 Tag const & tag, std::initializer_list<int>
const & value,
83 std::initializer_list<std::initializer_list<uint8_t>>
const & value,
91 void remove(
Tag const & tag);
97 std::size_t size()
const;
100 bool has(
Tag const & tag)
const;
107 VR get_vr(
Tag const & tag)
const;
114 bool empty(
Tag const & tag)
const;
121 std::size_t size(
Tag const & tag)
const;
128 Element const & operator[](
Tag const & tag)
const;
138 bool is_int(
Tag const & tag)
const;
150 bool is_real(
Tag const & tag)
const;
159 Value::Real const & as_real(
Tag const & tag,
unsigned int position)
const;
162 bool is_string(
Tag const & tag)
const;
171 Value::String const & as_string(
Tag const & tag,
unsigned int position)
const;
174 bool is_data_set(
Tag const & tag)
const;
183 DataSet const & as_data_set(
Tag const & tag,
unsigned int position)
const;
186 bool is_binary(
Tag const & tag)
const;
195 Value::Binary::value_type
const &
196 as_binary(
Tag const & tag,
unsigned int position)
const;
202 const_iterator begin()
const;
205 const_iterator end()
const;
208 bool operator==(
DataSet const & other)
const;
211 bool operator!=(
DataSet const & other)
const;
214 void clear(
Tag const & tag);
217 std::string
const & get_transfer_syntax()
const;
220 void set_transfer_syntax(std::string
const & transfer_syntax);
223 typedef std::map<Tag, Element> ElementMap;
225 ElementMap _elements;
228 std::string _transfer_syntax;
233 #endif // _8424446e_1153_4acc_9f57_e86faa7246e3 std::vector< String > Strings
String container.
Definition: Value.h:57
std::vector< Real > Reals
Real container.
Definition: Value.h:54
double Real
Real type.
Definition: Value.h:45
Definition: Association.cpp:39
A DICOM element tag.
Definition: Tag.h:24
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
DICOM Data set.
Definition: DataSet.h:29
std::map< Tag, Element >::const_iterator const_iterator
Iterator to the elements.
Definition: DataSet.h:199
Element of a DICOM data set.
Definition: Element.h:26
int64_t Integer
Integer type.
Definition: Value.h:42