MeVisLab Toolbox Reference
DCMTree::MFPixelTag Class Referenceabstract

#include <DCMTree_MFPixelTag.h>

Inheritance diagram for DCMTree::MFPixelTag:
DCMTree::Tag DCMTree_Serialization::Serializable DCMTree_Serialization::Deserializable

Public Types

typedef DCMTree::pixel_cont_t pixel_cont_t
 
typedef boost::shared_ptr< FileCachefile_cache_t
 

Public Member Functions

 MFPixelTag (TagInfo const &tagInfo, std::string const &filename, boost::uint32_t value_count, boost::uint32_t value_size)
 
 ~MFPixelTag () override
 
TagPtr copy () const override=0
 Makes a deep copy of this, overwriting the original copy method.
 
virtual file_cache_t createFileCache () const =0
 
virtual pixel_cont_t getFrame (boost::uint32_t idx)=0
 
virtual pixel_cont_t getFrame (boost::uint32_t idx, FileCache *cache)=0
 
virtual pixel_cont_t getFrame (boost::uint32_t idx, std::string &colorModel, unsigned int &fragment)=0
 
virtual pixel_cont_t getFrame (boost::uint32_t idx, std::string &colorModel, unsigned int &fragment, DCMTree::FileCache *cache)=0
 
virtual boost::uint32_t numberOfFrames () const
 
virtual boost::uint32_t frameSize () const
 
boost::uint32_t numberOfValues () const override
 Returns the number of values of this tag.
 
boost::uint32_t getValueSize (unsigned int) const override
 Returns the size in bytes of the data of the value-object with index idx.
 
boost::uint32_t getValueSize () const override
 Returns the total size in bytes of the data of the values.
 
- Public Member Functions inherited from DCMTree::Tag
 Tag ()
 Constructor.
 
 Tag (const TagInfo &info)
 Constructor info defines the data type, name, etc., of this tag.
 
 Tag (const Tag &other)
 Copy constructor that uses operator=.
 
 Tag (const Tag &other, unsigned short slot)
 Copy constructor for private tags with a given private slot.
 
 ~Tag () override
 Destructor.
 
Tagoperator= (const Tag &other)
 Deep copies all values from other to this.
 
bool operator== (const Tag &other) const
 Compares the tag with all contained values for equality.
 
bool operator!= (const Tag &other) const
 
bool isEqual (const Tag &other, double tolerance=0) const
 Compares the tag with all contained values for equality; use tolerance for float value comparison.
 
const TagInfoinfo () const
 Returns the tag information (type, etc.) of this tag.
 
const TreePtrVectorsequenceItems () const
 Accesses the probably embedded sequences of this tag.
 
TreePtrVectorsequenceItems ()
 Accesses the probably embedded sequences of this tag.
 
boost::uint32_t numberOfSequenceItems () const
 Returns the number of embedded sequence items of this tag.
 
void dropSequenceItems ()
 Drops all sequences of this tag.
 
void dropSequenceItem (unsigned idx)
 Drop the idx sequences of this tag.
 
void dropValues ()
 Drop all values of this tag.
 
bool isEmpty () const
 Returns true if this tag has no sequences and no values.
 
bool isSequence () const
 Returns true if the VR of this tag is SQ.
 
bool isNull (unsigned idx) const
 Checks whether the values with index idx is null.
 
bool isSequenceItemNull (unsigned idx) const
 Checks whether the sequence with index idx is null.
 
void setInfo (const TagInfo &info)
 Sets the tag info for this tag.
 
void addSequenceItem (const TreePtr &sequence)
 Adds the given TreePtr as a sequence to this tag.
 
TreePtraddSequenceItem ()
 Adds a sequence to this tag and returns a reference to it for further processing.
 
void setSequenceItem (const TreePtr &sequence, unsigned idx=0)
 Sets the sequence with index idx.
 
std::string toString (unsigned int idx, StringTrimMode trimMode=DO_NOT_TRIM) const
 Returns the value of tag value idx as a string.
 
std::string toString (StringTrimMode trimMode=DO_NOT_TRIM) const
 Converts the complete tag to a string.
 
void setValue (std::string value, unsigned int idx=0)
 Sets the value of tag value idx as string.
 
void addValue (std::string value)
 Converts string to one or more values and add them to this tag.
 
Date toDate (unsigned int idx=0) const
 Returns the value of tag value idx as date.
 
void setValue (Date value, unsigned int idx=0)
 Sets the value of tag value idx as date.
 
void addValue (Date value)
 Adds a value of this tag as date.
 
Time toTime (unsigned int idx=0) const
 Returns the value of tag value idx as time.
 
void setValue (Time value, unsigned int idx=0)
 Sets thevalue of tag value idx as time.
 
void addValue (Time value)
 Adds a value of this tag as time.
 
DateTime toDateTime (unsigned int idx=0) const
 Returns the value of tag value idx as datetime.
 
void setValue (DateTime value, unsigned int idx=0)
 Sets the value of tag value idx as datetime.
 
void addValue (DateTime value)
 Adds a value of this tag as datetime.
 
float toFloat (unsigned int idx=0) const
 Returns the value of tag value idx as float.
 
void setValue (float value, unsigned int idx=0)
 Sets the value of tag value idx as float.
 
void addValue (float value)
 Adds a value of this tag as float.
 
double toDouble (unsigned int idx=0) const
 Returns the value of tag value idx as double.
 
void setValue (double value, unsigned int idx=0)
 Sets the value of tag value idx as double.
 
void addValue (double value)
 Adds a value of this tag as double.
 
int toInt (unsigned int idx=0) const
 Returns the value of tag value idx as int.
 
void setValue (int value, unsigned int idx=0)
 Sets the value of tag value idx as int.
 
void addValue (int value)
 Adds a value of this tag as int.
 
unsigned int toUInt (unsigned int idx=0) const
 Returns the value of tag-value idx as unsigned int.
 
void setValue (unsigned int value, unsigned int idx=0)
 Sets the value of tag value idx as unsigned int.
 
void addValue (unsigned int value)
 Adds a value of this tag as unsigned int.
 
short int toShort (unsigned int idx=0) const
 Returns the value of tag value idx as short.
 
void setValue (short int value, unsigned int idx=0)
 Sets the value of tag value idx as short.
 
void addValue (short int value)
 Adds a value of this tag as short.
 
unsigned short toUShort (unsigned int idx=0) const
 Returns the value of tag value idx as unsigned short.
 
void setValue (unsigned short int value, unsigned int idx=0)
 Sets the value of tag value idx as unsigned short.
 
void addValue (unsigned short int value)
 Adds a value of this tag as unsigned short.
 
const ValuegetValue (unsigned int idx=0) const
 Returns the value object with index idx.
 
void setValue (const Value &value, unsigned int idx=0)
 Sets the value object with index idx.
 
virtual ValueaddValue ()
 Adds a value and return a reference for further processing.
 
virtual void fromStream (std::istream &in, bool readName, size_t maxSize=0)
 Extracts this instance from the given stream.
 
virtual void toStream (std::ostream &out, bool writeName) const
 Copies this instance recursively into the given stream.
 
int compare (const Tag &tag, double tolerance=0.0001) const
 Compares this to tag and returns -1 if this < tag, 0 if this == tag, and 1 if this > tag.
 
void setVr (Vr vr)
 Sets a new value representation if the VR is unknown.
 
void serializeX (DCMTree_Serialization::Sink &sink) const override
 Writes data of this object to sink.
 
void deserializeX (DCMTree_Serialization::Source &source) override
 Overwrites data of this object with data from source.
 
- Public Member Functions inherited from DCMTree_Serialization::Serializable
virtual ~Serializable ()
 Empty.
 
- Public Member Functions inherited from DCMTree_Serialization::Deserializable
virtual ~Deserializable ()
 Empty.
 

Protected Member Functions

boost::uint32_t valueCount () const
 
boost::uint32_t valueSize () const
 
std::string const & filename () const
 
- Protected Member Functions inherited from DCMTree::Tag
TagInfo const & tagInfo () const
 

Detailed Description

Definition at line 35 of file DCMTree_MFPixelTag.h.

Member Typedef Documentation

◆ file_cache_t

typedef boost::shared_ptr<FileCache> DCMTree::MFPixelTag::file_cache_t

Definition at line 39 of file DCMTree_MFPixelTag.h.

◆ pixel_cont_t

Constructor & Destructor Documentation

◆ MFPixelTag()

DCMTree::MFPixelTag::MFPixelTag ( TagInfo const &  tagInfo,
std::string const &  filename,
boost::uint32_t  value_count,
boost::uint32_t  value_size 
)

◆ ~MFPixelTag()

DCMTree::MFPixelTag::~MFPixelTag ( )
override

Member Function Documentation

◆ copy()

TagPtr DCMTree::MFPixelTag::copy ( ) const
overridepure virtual

Makes a deep copy of this, overwriting the original copy method.

Reimplemented from DCMTree::Tag.

◆ createFileCache()

virtual file_cache_t DCMTree::MFPixelTag::createFileCache ( ) const
pure virtual

◆ filename()

std::string const & DCMTree::MFPixelTag::filename ( ) const
inlineprotected

Definition at line 68 of file DCMTree_MFPixelTag.h.

◆ frameSize()

virtual boost::uint32_t DCMTree::MFPixelTag::frameSize ( ) const
virtual

◆ getFrame() [1/4]

virtual pixel_cont_t DCMTree::MFPixelTag::getFrame ( boost::uint32_t  idx)
pure virtual

◆ getFrame() [2/4]

virtual pixel_cont_t DCMTree::MFPixelTag::getFrame ( boost::uint32_t  idx,
FileCache cache 
)
pure virtual

◆ getFrame() [3/4]

virtual pixel_cont_t DCMTree::MFPixelTag::getFrame ( boost::uint32_t  idx,
std::string &  colorModel,
unsigned int &  fragment 
)
pure virtual

◆ getFrame() [4/4]

virtual pixel_cont_t DCMTree::MFPixelTag::getFrame ( boost::uint32_t  idx,
std::string &  colorModel,
unsigned int &  fragment,
DCMTree::FileCache cache 
)
pure virtual

◆ getValueSize() [1/2]

boost::uint32_t DCMTree::MFPixelTag::getValueSize ( ) const
overridevirtual

Returns the total size in bytes of the data of the values.

Reimplemented from DCMTree::Tag.

◆ getValueSize() [2/2]

boost::uint32_t DCMTree::MFPixelTag::getValueSize ( unsigned int  idx) const
overridevirtual

Returns the size in bytes of the data of the value-object with index idx.

Throws if the index is out of range.

Reimplemented from DCMTree::Tag.

◆ numberOfFrames()

virtual boost::uint32_t DCMTree::MFPixelTag::numberOfFrames ( ) const
virtual

◆ numberOfValues()

boost::uint32_t DCMTree::MFPixelTag::numberOfValues ( ) const
overridevirtual

Returns the number of values of this tag.

Reimplemented from DCMTree::Tag.

◆ valueCount()

boost::uint32_t DCMTree::MFPixelTag::valueCount ( ) const
inlineprotected

Definition at line 66 of file DCMTree_MFPixelTag.h.

◆ valueSize()

boost::uint32_t DCMTree::MFPixelTag::valueSize ( ) const
inlineprotected

Definition at line 67 of file DCMTree_MFPixelTag.h.


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