MeVisLab Toolbox Reference
|
Class to hold data of an DICOM message that is not part of the message itself. More...
#include <DCMTree_Message.h>
Public Member Functions | |
Message () | |
Constructor Defaults to the default character set and implicit little-endian. More... | |
Message (const Message &other) | |
Copy constructor - makes a deep copy. More... | |
Message (const std::string &specificCharacterSet, TransferSyntax syntax) | |
Initializes the message with the given values. More... | |
~Message () override | |
Destructor. More... | |
void | convertToCharacterSet (const std::string &characterset) |
Converts the internal tag tree(s) to the given character set. More... | |
Message & | operator= (const Message &other) |
Makes a deep copy of the given instance into *this. More... | |
std::string | specificCharacterSet () |
Returns the specific character set of this message. More... | |
std::string | specifiedCharacterSet () |
Returns the specific character set specified in the tags of this message. More... | |
TransferSyntax | syntax () const |
Returns the transfer syntax of this message. More... | |
const TreePtr & | tags () |
Accesses all the tags (non-const access). More... | |
const Const_TreePtr & | tags () const |
Accesses all the tags (const access). More... | |
void | setTags (TreePtr tags) |
Specifies tags tree (modifiable). More... | |
void | setTags (Const_TreePtr tags) |
Specifies tags tree (non-modifiable). More... | |
void | fromStream (std::istream &in, bool readName) |
Extracts this instance from the given stream. More... | |
void | toStream (std::ostream &out, bool writeName) const |
Copies this instance recursively into the given stream. More... | |
void | serializeX (DCMTree_Serialization::Sink &sink) const override |
Writes data of this object to sink . More... | |
void | deserializeX (DCMTree_Serialization::Source &source) override |
Overwrites data of this object with data from source . More... | |
![]() | |
virtual | ~Serializable () |
Empty. More... | |
![]() | |
virtual | ~Deserializable () |
Empty. More... | |
Class to hold data of an DICOM message that is not part of the message itself.
Message does not automatically read or change tags from its internal tag tree(s); this is the job of the reader and writer.
Definition at line 40 of file DCMTree_Message.h.
DCMTree::Message::Message | ( | ) |
Constructor Defaults to the default character set and implicit little-endian.
DCMTree::Message::Message | ( | const Message & | other | ) |
Copy constructor - makes a deep copy.
DCMTree::Message::Message | ( | const std::string & | specificCharacterSet, |
TransferSyntax | syntax | ||
) |
Initializes the message with the given values.
|
override |
Destructor.
void DCMTree::Message::convertToCharacterSet | ( | const std::string & | characterset | ) |
Converts the internal tag tree(s) to the given character set.
|
overridevirtual |
Overwrites data of this object with data from source
.
All the rules stated for SCR::Serializable::serializeX apply correspondingly.
Implements DCMTree_Serialization::Deserializable.
void DCMTree::Message::fromStream | ( | std::istream & | in, |
bool | readName | ||
) |
Extracts this instance from the given stream.
readName = true
reads tag name(s) from stream, false
assumes that no name(s) is/are in stream. IMPORTANT: This method is used for file format persistence; thus stream contents must be maintained compatible. Note: This method is not endian safe.
Referenced by DCMTree::operator>>().
Makes a deep copy of the given instance into *this.
|
overridevirtual |
Writes data of this object to sink
.
Implementations of Serializable::serializeX should strictly follow this pattern:
class C: public SCR::Serializable { T1 _m1; T2 _m2; T3 _m3; public: void serializeX(SCR::Sink &sink) const { SCR::serializeX(sink, _m1); SCR::serializeX(sink, _m2); SCR::serializeX(sink, _m3); } };
That is, you should call some overloading of SCR::serializeX for every member.
If some of the types T1, T2, T3 are not serializable, you should make them serializable.
Implements DCMTree_Serialization::Serializable.
void DCMTree::Message::setTags | ( | Const_TreePtr | tags | ) |
Specifies tags tree (non-modifiable).
void DCMTree::Message::setTags | ( | TreePtr | tags | ) |
Specifies tags tree (modifiable).
std::string DCMTree::Message::specificCharacterSet | ( | ) |
Returns the specific character set of this message.
std::string DCMTree::Message::specifiedCharacterSet | ( | ) |
Returns the specific character set specified in the tags of this message.
TransferSyntax DCMTree::Message::syntax | ( | ) | const |
Returns the transfer syntax of this message.
const TreePtr& DCMTree::Message::tags | ( | ) |
Accesses all the tags (non-const access).
const Const_TreePtr& DCMTree::Message::tags | ( | ) | const |
Accesses all the tags (const access).
void DCMTree::Message::toStream | ( | std::ostream & | out, |
bool | writeName | ||
) | const |
Copies this instance recursively into the given stream.
writeName = true
writes tag name(s) to stream, false
writes no name(s) into stream. IMPORTANT: This method is used for file format persistence; thus stream contents must be maintained compatible. Note: This method is not endian safe.
Referenced by DCMTree::operator<<().