Odil
A C++11 library for the DICOM standard
|
Go to the documentation of this file.
9 #ifndef _ca5c06d2_04f9_4009_9e98_5607e1060379
10 #define _ca5c06d2_04f9_4009_9e98_5607e1060379
56 T
const & value, std::ostream & stream,
ByteOrdering byte_ordering);
65 std::ostream & stream,
68 bool use_group_length=
false);
75 std::ostream & stream,
76 std::string
const & transfer_syntax,
78 bool use_group_length=
false);
91 std::shared_ptr<DataSet const> data_set, std::ostream & stream,
92 std::shared_ptr<DataSet const> meta_information={},
94 ItemEncoding item_encoding=ItemEncoding::ExplicitLength,
95 bool use_group_length=
false);
101 typedef void result_type;
103 std::ostream & stream;
108 ItemEncoding item_encoding;
109 bool use_group_length;
112 std::ostream & stream,
VR vr,
113 ByteOrdering byte_ordering,
bool explicit_vr, ItemEncoding item_encoding,
114 bool use_group_length);
117 result_type operator()(
Value::Reals const & value)
const;
123 void write_strings(T
const & sequence,
char padding)
const;
129 #include "odil/Writer.txx"
131 #endif // _ca5c06d2_04f9_4009_9e98_5607e1060379
Element of a DICOM data set.
Definition: Element.h:27
ByteOrdering
Definition: endian.h:30
std::vector< String > Strings
String container.
Definition: Value.h:57
Definition: Association.h:25
ItemEncoding item_encoding
Encoding of sequence items.
Definition: Writer.h:46
#define ODIL_API
Definition: odil.h:28
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.
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:63
bool use_group_length
Presence of group length elements.
Definition: Writer.h:48
A DICOM element tag.
Definition: Tag.h:25
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.
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).
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.
VR
Value representations of DICOM.
Definition: VR.h:23
Writer(std::ostream &stream, ByteOrdering byte_ordering, bool explicit_vr, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false)
Build a writer.
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition: Value.h:60
ItemEncoding
Encodings of sequence items.
Definition: Writer.h:33
ByteOrdering byte_ordering
Endianness.
Definition: Writer.h:42
bool explicit_vr
Explicit-ness of the Value Representations.
Definition: Writer.h:44
std::vector< Real > Reals
Real container.
Definition: Value.h:54
void write_data_set(std::shared_ptr< DataSet const > data_set) const
Write a data set.
std::vector< Integer > Integers
Integer container.
Definition: Value.h:51
std::string const ExplicitVRLittleEndian("1.2.840.10008.1.2.1")
void write_element(Element const &element) const
Write an element (VR, VL and value).
void write_tag(Tag const &tag) const
Write a tag.
Write DICOM objects to a stream.
Definition: Writer.h:29
std::ostream & stream
Output stream.
Definition: Writer.h:39