Odil
A C++11 library for the DICOM standard
|
Go to the documentation of this file.
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 std::shared_ptr<DataSet>
const &
184 as_data_set(Tag
const & tag,
unsigned int position)
const;
196 Value::Binary::value_type
const &
197 as_binary(Tag
const & tag,
unsigned int position)
const;
200 typedef std::map<Tag, Element>::const_iterator const_iterator;
203 const_iterator begin()
const;
206 const_iterator end()
const;
221 void clear(
Tag const & tag);
224 std::string
const & get_transfer_syntax()
const;
227 void set_transfer_syntax(std::string
const & transfer_syntax);
230 typedef std::map<Tag, Element> ElementMap;
232 ElementMap _elements;
235 std::string _transfer_syntax;
240 #endif // _8424446e_1153_4acc_9f57_e86faa7246e3
bool is_int(VR vr)
Test whether a VR contains integers.
Element of a DICOM data set.
Definition: Element.h:30
bool operator==(Value::DataSets const &left, Value::DataSets const &right)
Equality test.
std::vector< String > Strings
String container.
Definition: Value.h:61
#define ODIL_DATASET_ADD(type)
Definition: DataSet.h:63
bool is_binary(VR vr)
Test whether a VR contains binary data.
Definition: Association.h:23
#define ODIL_API
Definition: odil.h:27
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:67
std::string String
String type.
Definition: Value.h:52
double Real
Real type.
Definition: Value.h:49
A DICOM element tag.
Definition: Tag.h:28
bool operator!=(Value::DataSets const &left, Value::DataSets const &right)
Difference test.
std::string as_string(VR vr)
Convert a VR to its string representation.
bool is_string(VR vr)
Test whether a VR contains text.
VR
Value representations of DICOM.
Definition: VR.h:26
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition: Value.h:64
int64_t Integer
Integer type.
Definition: Value.h:46
bool is_real(VR vr)
Test whether a VR contains rel numbers.
std::vector< Real > Reals
Real container.
Definition: Value.h:58
std::vector< Integer > Integers
Integer container.
Definition: Value.h:55
DICOM Data set.
Definition: DataSet.h:33