MeVisLab Toolbox Reference
DCMTree::TagInfo Class Reference

Class to carry meta information about a specific tag. More...

#include <DCMTree_TagInfo.h>

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

Public Member Functions

 TagInfo ()
 Constructor. More...
 
 TagInfo (const TagId &tagid, const Dict &dictionary)
 Creates a new instance. More...
 
 TagInfo (const TagId &tagid, const Vr &vr, const TagValueMultiplicity &multiplicity)
 Creates a new instance that is initialized with the given values. More...
 
 TagInfo (const TagInfo &other)
 Copy constructor. More...
 
 ~TagInfo () override
 Destructor. More...
 
TagInfooperator= (const TagInfo &other)
 Assignment operator. More...
 
const TagIdid () const
 Returns the TagId of this. More...
 
const Vrvr () const
 Returns the VR of this. More...
 
bool isCodedString () const
 Checks whether the string encoding depends on the specific character set. More...
 
const TagValueMultiplicitymultiplicity () const
 Returns the multiplicity of this. More...
 
void setId (const TagId &tagid)
 Sets the TagId of this. More...
 
void setVr (const Vr &vr)
 Sets the VR of this. More...
 
void setMultiplicity (const TagValueMultiplicity &multiplicity)
 Sets the multiplicity of this. More...
 
void fromStream (std::istream &in, bool readName, size_t maxSize=0)
 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...
 
- Public Member Functions inherited from DCMTree_Serialization::Serializable
virtual ~Serializable ()
 Empty. More...
 
- Public Member Functions inherited from DCMTree_Serialization::Deserializable
virtual ~Deserializable ()
 Empty. More...
 

Detailed Description

Class to carry meta information about a specific tag.

Definition at line 34 of file DCMTree_TagInfo.h.

Constructor & Destructor Documentation

◆ TagInfo() [1/4]

DCMTree::TagInfo::TagInfo ( )

Constructor.

◆ TagInfo() [2/4]

DCMTree::TagInfo::TagInfo ( const TagId tagid,
const Dict dictionary 
)

Creates a new instance.

It is getting the values regarding the tag ID from the dictionary.

◆ TagInfo() [3/4]

DCMTree::TagInfo::TagInfo ( const TagId tagid,
const Vr vr,
const TagValueMultiplicity multiplicity 
)

Creates a new instance that is initialized with the given values.

◆ TagInfo() [4/4]

DCMTree::TagInfo::TagInfo ( const TagInfo other)

Copy constructor.

◆ ~TagInfo()

DCMTree::TagInfo::~TagInfo ( )
override

Destructor.

Member Function Documentation

◆ deserializeX()

void DCMTree::TagInfo::deserializeX ( DCMTree_Serialization::Source source)
overridevirtual

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.

◆ fromStream()

void DCMTree::TagInfo::fromStream ( std::istream &  in,
bool  readName,
size_t  maxSize = 0 
)

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. maxSize > 0 will interrupt loops with further stream reading operations if maxSize is exceeded within the loop. IMPORTANT: This method is used for file format persistence; thus stream contents must be maintained compatible.

Referenced by DCMTree::operator>>().

◆ id()

const TagId& DCMTree::TagInfo::id ( ) const

Returns the TagId of this.

◆ isCodedString()

bool DCMTree::TagInfo::isCodedString ( ) const

Checks whether the string encoding depends on the specific character set.

◆ multiplicity()

const TagValueMultiplicity& DCMTree::TagInfo::multiplicity ( ) const

Returns the multiplicity of this.

◆ operator=()

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

Assignment operator.

Copies all values from other to this. Handles self-assignment well.

◆ serializeX()

void DCMTree::TagInfo::serializeX ( DCMTree_Serialization::Sink sink) const
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.

See also
SCR

Implements DCMTree_Serialization::Serializable.

◆ setId()

void DCMTree::TagInfo::setId ( const TagId tagid)

Sets the TagId of this.

◆ setMultiplicity()

void DCMTree::TagInfo::setMultiplicity ( const TagValueMultiplicity multiplicity)

Sets the multiplicity of this.

◆ setVr()

void DCMTree::TagInfo::setVr ( const Vr vr)

Sets the VR of this.

◆ toStream()

void DCMTree::TagInfo::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.

Referenced by DCMTree::operator<<().

◆ vr()

const Vr& DCMTree::TagInfo::vr ( ) const

Returns the VR of this.


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