9#ifndef _ca5c06d2_04f9_4009_9e98_5607e1060379
10#define _ca5c06d2_04f9_4009_9e98_5607e1060379
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,
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"
Element of a DICOM data set.
Definition: Element.h:27
A DICOM element tag.
Definition: Tag.h:26
std::vector< String > Strings
String container.
Definition: Value.h:57
std::vector< Integer > Integers
Integer container.
Definition: Value.h:51
std::vector< std::vector< uint8_t > > Binary
Binary data container.
Definition: Value.h:63
std::vector< Real > Reals
Real container.
Definition: Value.h:54
std::vector< std::shared_ptr< DataSet > > DataSets
Data sets container.
Definition: Value.h:60
Write DICOM objects to a stream.
Definition: Writer.h:29
bool explicit_vr
Explicit-ness of the Value Representations.
Definition: Writer.h:44
void write_data_set(std::shared_ptr< DataSet const > data_set) const
Write a data set.
void write_element(Element const &element) const
Write an element (VR, VL and value).
void write_tag(Tag const &tag) const
Write a tag.
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).
std::ostream & stream
Output stream.
Definition: Writer.h:39
ItemEncoding
Encodings of sequence items.
Definition: Writer.h:33
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 void write_encapsulated_pixel_data(Value::Binary const &value, std::ostream &stream, ByteOrdering byte_ordering, bool explicit_vr)
Write pixel data in encapsulated form.
Writer(std::ostream &stream, ByteOrdering byte_ordering, bool explicit_vr, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false)
Build a writer.
ByteOrdering byte_ordering
Endianness.
Definition: Writer.h:42
bool use_group_length
Presence of group length elements.
Definition: Writer.h:48
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.
ItemEncoding item_encoding
Encoding of sequence items.
Definition: Writer.h:46
std::string const ExplicitVRLittleEndian("1.2.840.10008.1.2.1")
Definition: Association.h:25
ByteOrdering const byte_ordering
ByteOrdering
Definition: endian.h:30
VR
Value representations of DICOM.
Definition: VR.h:23
#define ODIL_API
Definition: odil.h:28