Odil
A C++11 library for the DICOM standard
|
Write DICOM objects to a stream. More...
#include <Writer.h>
Public Types | |
enum | ItemEncoding { ItemEncoding::ExplicitLength, ItemEncoding::UndefinedLength } |
Encodings of sequence items. More... | |
Public Member Functions | |
Writer (std::ostream &stream, ByteOrdering byte_ordering, bool explicit_vr, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false) | |
Build a writer. More... | |
Writer (std::ostream &stream, std::string const &transfer_syntax, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false) | |
Build a writer, derive byte ordering and explicit-ness of VR from transfer syntax. More... | |
void | write_data_set (std::shared_ptr< DataSet const > data_set) const |
Write a data set. More... | |
void | write_tag (Tag const &tag) const |
Write a tag. More... | |
void | write_element (Element const &element) const |
Write an element (VR, VL and value). More... | |
Static Public Member Functions | |
template<typename T > | |
static void | write_binary (T const &value, std::ostream &stream, ByteOrdering byte_ordering) |
Write binary data to an stream encoded with the given endianness, ensure stream is still good. More... | |
static void | write_encapsulated_pixel_data (Value::Binary const &value, std::ostream &stream, ByteOrdering byte_ordering, bool explicit_vr) |
Write pixel data in encapsulated form. More... | |
static void | write_file (std::shared_ptr< DataSet const > data_set, std::ostream &stream, std::shared_ptr< DataSet const > meta_information={}, std::string const &transfer_syntax=registry::ExplicitVRLittleEndian, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false) |
Write a file (meta-information and data set). More... | |
Public Attributes | |
std::ostream & | stream |
Output stream. More... | |
ByteOrdering | byte_ordering |
Endianness. More... | |
bool | explicit_vr |
Explicit-ness of the Value Representations. More... | |
ItemEncoding | item_encoding |
Encoding of sequence items. More... | |
bool | use_group_length |
Presence of group length elements. More... | |
Write DICOM objects to a stream.
|
strong |
odil::Writer::Writer | ( | std::ostream & | stream, |
ByteOrdering | byte_ordering, | ||
bool | explicit_vr, | ||
ItemEncoding | item_encoding = ItemEncoding::ExplicitLength , |
||
bool | use_group_length = false |
||
) |
Build a writer.
odil::Writer::Writer | ( | std::ostream & | stream, |
std::string const & | transfer_syntax, | ||
ItemEncoding | item_encoding = ItemEncoding::ExplicitLength , |
||
bool | use_group_length = false |
||
) |
Build a writer, derive byte ordering and explicit-ness of VR from transfer syntax.
|
static |
Write binary data to an stream encoded with the given endianness, ensure stream is still good.
void odil::Writer::write_data_set | ( | std::shared_ptr< DataSet const > | data_set | ) | const |
Write a data set.
void odil::Writer::write_element | ( | Element const & | element | ) | const |
Write an element (VR, VL and value).
|
static |
Write pixel data in encapsulated form.
|
static |
Write a file (meta-information and data set).
void odil::Writer::write_tag | ( | Tag const & | tag | ) | const |
Write a tag.
ByteOrdering odil::Writer::byte_ordering |
Endianness.
bool odil::Writer::explicit_vr |
Explicit-ness of the Value Representations.
ItemEncoding odil::Writer::item_encoding |
Encoding of sequence items.
std::ostream& odil::Writer::stream |
Output stream.
bool odil::Writer::use_group_length |
Presence of group length elements.