MeVisLabToolboxReference
DCMTree::Message Class Reference

class to hold data of an DICOM message, which is not part of the message itself. More...

#include <DCMTree_Message.h>

Inheritance diagram for DCMTree::Message:
DCMTree_Serialization::Serializable DCMTree_Serialization::Deserializable

List of all members.

Public Member Functions

 Message ()
 ctor default to default-character-set and implicit-little-endian
 Message (const Message &other)
 copy ctor - make deep copy
 Message (const std::string &specificCharacterSet, TransferSyntax syntax)
 initializes the message with the given values
virtual ~Message ()
 dtor
void convertToCharacterSet (const std::string &characterset)
 convert the internal tag-tree(s) to the given character set
Messageoperator= (const Message &other)
 makes a deep copy of the given instance into *this
std::string specificCharacterSet ()
 get the specific character set of this message
std::string specifiedCharacterSet ()
 get the specific character set specified in the tags of this message
TransferSyntax syntax () const
 get the transfer-syntax of this message
const TreePtrtags ()
 access all the tags (non-const access)
const Const_TreePtrtags () const
 access all the tags (const access)
void setTags (TreePtr tags)
 Specify tags tree (modifiable)
void setTags (Const_TreePtr tags)
 Specify tags tree (non-modifiable)
void fromStream (std::istream &in, bool readName)
 extract this instance from the given stream readName = true reads tag name(s) from stream, false assumes that no name(s) is/are in stream.
void toStream (std::ostream &out, bool writeName) const
 copy this instance recursively into the given stream writeName = true writes tag name(s) to stream, false writes no name(s) into stream.
void serializeX (DCMTree_Serialization::Sink &sink) const
 Writes data of this object to Sink.
void deserializeX (DCMTree_Serialization::Source &source)
 Overwrites data of this object with data from Source.

Detailed Description

class to hold data of an DICOM message, which 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 39 of file DCMTree_Message.h.


Constructor & Destructor Documentation

DCMTree::Message::Message ( )

ctor default to default-character-set and implicit-little-endian

DCMTree::Message::Message ( const Message other)

copy ctor - make deep copy

DCMTree::Message::Message ( const std::string &  specificCharacterSet,
TransferSyntax  syntax 
)

initializes the message with the given values

virtual DCMTree::Message::~Message ( ) [virtual]

dtor


Member Function Documentation

void DCMTree::Message::convertToCharacterSet ( const std::string &  characterset)

convert the internal tag-tree(s) to the given character set

void DCMTree::Message::deserializeX ( DCMTree_Serialization::Source source) [virtual]

Overwrites data of this object with data from Source.

All the rules stated for SCR::Serializable::serializeX apply correspondingly.

See also:
SCR::Serializable::serializeX

Implements DCMTree_Serialization::Deserializable.

void DCMTree::Message::fromStream ( std::istream &  in,
bool  readName 
)

extract 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>>().

Message& DCMTree::Message::operator= ( const Message other)

makes a deep copy of the given instance into *this

void DCMTree::Message::serializeX ( DCMTree_Serialization::Sink sink) const [virtual]

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.

See also:
SCR

Implements DCMTree_Serialization::Serializable.

void DCMTree::Message::setTags ( TreePtr  tags)

Specify tags tree (modifiable)

void DCMTree::Message::setTags ( Const_TreePtr  tags)

Specify tags tree (non-modifiable)

std::string DCMTree::Message::specificCharacterSet ( )

get the specific character set of this message

std::string DCMTree::Message::specifiedCharacterSet ( )

get the specific character set specified in the tags of this message

TransferSyntax DCMTree::Message::syntax ( ) const

get the transfer-syntax of this message

const TreePtr& DCMTree::Message::tags ( )

access all the tags (non-const access)

const Const_TreePtr& DCMTree::Message::tags ( ) const

access all the tags (const access)

void DCMTree::Message::toStream ( std::ostream &  out,
bool  writeName 
) const

copy 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<<().


The documentation for this class was generated from the following file: