9 #ifndef _8424446e_1153_4acc_9f57_e86faa7246e3 10 #define _8424446e_1153_4acc_9f57_e86faa7246e3 14 #include <initializer_list> 33 explicit DataSet(std::string
const & transfer_syntax=
"");
46 void add(
Tag const & tag,
Element const & element);
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, \ 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;
135 Element & operator[](Tag
const & tag);
138 bool is_int(Tag
const & tag)
const;
147 Value::Integer const & as_int(Tag
const & tag,
unsigned int position)
const;
150 bool is_real(Tag
const & tag)
const;
159 Value::Real const & as_real(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;
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;
220 void clear(
Tag const & tag);
223 std::string
const & get_transfer_syntax()
const;
226 void set_transfer_syntax(std::string
const & transfer_syntax);
229 typedef std::map<Tag, Element> ElementMap;
231 ElementMap _elements;
234 std::string _transfer_syntax;
239 #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
bool is_string(VR vr)
Test whether a VR contains text.
DICOM Data set.
Definition: DataSet.h:29
int64_t Integer
Integer type.
Definition: Value.h:42
bool is_real(VR vr)
Test whether a VR contains rel numbers.
std::vector< DataSet > DataSets
Data sets container.
Definition: Value.h:60
#define ODIL_DATASET_ADD(type)
Definition: DataSet.h:54
Element of a DICOM data set.
Definition: Element.h:26
Definition: Association.h:24
std::string String
String type.
Definition: Value.h:48
A DICOM element tag.
Definition: Tag.h:24
#define ODIL_API
Definition: odil.h:28
bool is_int(VR vr)
Test whether a VR contains integers.
bool is_binary(VR vr)
Test whether a VR contains binary data.
std::map< Tag, Element >::const_iterator const_iterator
Iterator to the elements.
Definition: DataSet.h:199
std::vector< Integer > Integers
Integer container.
Definition: Value.h:51
double Real
Real type.
Definition: Value.h:45
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:63
VR
Value representations of DICOM.
Definition: VR.h:22
std::string as_string(VR vr)
Convert a VR to its string representation.