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
 make a deep-copy of this More...
 
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
 get the number of values of this tag More...
 
boost::uint32_t getValueSize (unsigned int) const override
 get the size in bytes of the data of the value-object with index idx throws if the index is out of range More...
 
boost::uint32_t getValueSize () const override
 get the total size in bytes of the data of the values More...
 
- Public Member Functions inherited from DCMTree::Tag
 Tag ()
 ctor More...
 
 Tag (const TagInfo &info)
 ctor info defines the datatype, name etc. More...
 
 Tag (const Tag &other)
 copy ctor - uses operator= More...
 
 Tag (const Tag &other, unsigned short slot)
 copy ctor for private tags with a given private slot More...
 
 ~Tag () override
 dtor More...
 
Tagoperator= (const Tag &other)
 deep copy all values from other to this handles self-assignment well More...
 
bool operator== (const Tag &other) const
 compare the tag with all contained values for equality More...
 
bool operator!= (const Tag &other) const
 
bool isEqual (const Tag &other, double tolerance=0) const
 compare the tag with all contained values for equality; use tolerance for float value comparison More...
 
const TagInfoinfo () const
 get the tag-info (type etc.) of this tag More...
 
const TreePtrVectorsequenceItems () const
 access the probably embedded sequences of this tag throws if this tag is not of type SQ! More...
 
TreePtrVectorsequenceItems ()
 access the probably embedded sequences of this tag throws if this tag is not of type SQ! More...
 
boost::uint32_t numberOfSequenceItems () const
 get the number of embedded sequence items of this tag does not check for SQ More...
 
void dropSequenceItems ()
 drop all sequences of this tag does not check for SQ (if not SQ you just drop nothing) More...
 
void dropSequenceItem (unsigned idx)
 drop the idx sequences of this tag throws if this tag tag is not of type SQ or the index is out of range More...
 
void dropValues ()
 drop all values of this tag does not drop sequences! these are handled differently! More...
 
bool isEmpty () const
 return true if this tag has no sequences and no values More...
 
bool isSequence () const
 return true if the vr of this tag is SQ More...
 
bool isNull (unsigned idx) const
 check if the values with index idx is null throws if the index is out of range More...
 
bool isSequenceItemNull (unsigned idx) const
 checks if the sequence with index idx is null throws if the index is out of range More...
 
void setInfo (const TagInfo &info)
 set the tag-info for this tag be careful if changing vr! More...
 
void addSequenceItem (const TreePtr &sequence)
 add the given TreePtr as sequence to this tag the referenced Tree remains valid tag stores only the reference, if the referenced data is changed externally this tag references the changes too if you need a dedicated copy, make one with Tree::copy! shared-pointers are to used to make it easier to edit/process sequences and to avoid copies More...
 
TreePtraddSequenceItem ()
 add a sequence to this tag and return a reference to it for further processing More...
 
void setSequenceItem (const TreePtr &sequence, unsigned idx=0)
 set the sequence with index idx same as addSequenceItem throws if the index is out of range More...
 
std::string toString (unsigned int idx, StringTrimMode trimMode=DO_NOT_TRIM) const
 get the value of tag-value idx as string throws if type-checking failed throws if the index is out of range trimMode offers the possibility to trim leading and trailing spaces More...
 
std::string toString (StringTrimMode trimMode=DO_NOT_TRIM) const
 convert the complete tag to a string that means, all values are concatenated by a backslash and converted to a string throws if not convertible trimMode offers the possibility to trim leading and trailing spaces More...
 
void setValue (std::string value, unsigned int idx=0)
 set the value of tag-value idx as string throws if type-checking failed throws if the index is out of range More...
 
void addValue (std::string value)
 convert string to one or more values and add them to this tag throws if not convertible More...
 
Date toDate (unsigned int idx=0) const
 get the value of tag-value idx as date throws if type-checking failed throws if the index is out of range More...
 
void setValue (Date value, unsigned int idx=0)
 set the value of tag-value idx as date throws if type-checking failed throws if the index is out of range More...
 
void addValue (Date value)
 add a value of this tag as date throws if type-checking failed More...
 
Time toTime (unsigned int idx=0) const
 get the value of tag-value idx as time throws if type-checking failed throws if the index is out of range More...
 
void setValue (Time value, unsigned int idx=0)
 set the value of tag-value idx as time throws if type-checking failed throws if the index is out of range More...
 
void addValue (Time value)
 add a value of this tag as time throws if type-checking failed More...
 
DateTime toDateTime (unsigned int idx=0) const
 get the value of tag-value idx as datetime throws if type-checking failed throws if the index is out of range More...
 
void setValue (DateTime value, unsigned int idx=0)
 set the value of tag-value idx as datetime throws if type-checking failed throws if the index is out of range More...
 
void addValue (DateTime value)
 add a value of this tag as datetime throws if type-checking failed More...
 
float toFloat (unsigned int idx=0) const
 get the value of tag-value idx as float throws if type-checking failed throws if the index is out of range More...
 
void setValue (float value, unsigned int idx=0)
 set the value of tag-value idx as float throws if type-checking failed throws if the index is out of range More...
 
void addValue (float value)
 add a value of this tag as float throws if type-checking failed More...
 
double toDouble (unsigned int idx=0) const
 get the value of tag-value idx as double throws if type-checking failed throws if the index is out of range More...
 
void setValue (double value, unsigned int idx=0)
 set the value of tag-value idx as double throws if type-checking failed throws if the index is out of range More...
 
void addValue (double value)
 add a value of this tag as double throws if type-checking failed More...
 
int toInt (unsigned int idx=0) const
 get the value of tag-value idx as int throws if type-checking failed throws if the index is out of range More...
 
void setValue (int value, unsigned int idx=0)
 set the value of tag-value idx as int throws if type-checking failed throws if the index is out of range More...
 
void addValue (int value)
 add a value of this tag as int throws if type-checking failed More...
 
unsigned int toUInt (unsigned int idx=0) const
 get the value of tag-value idx as unsigned int throws if type-checking failed throws if the index is out of range More...
 
void setValue (unsigned int value, unsigned int idx=0)
 set the value of tag-value idx as unsigned int throws if type-checking failed throws if the index is out of range More...
 
void addValue (unsigned int value)
 add a value of this tag as unsigned int throws if type-checking failed More...
 
short int toShort (unsigned int idx=0) const
 get the value of tag-value idx as short throws if type-checking failed throws if the index is out of range More...
 
void setValue (short int value, unsigned int idx=0)
 set the value of tag-value idx as short throws if type-checking failed throws if the index is out of range More...
 
void addValue (short int value)
 add a value of this tag as short throws if type-checking failed More...
 
unsigned short toUShort (unsigned int idx=0) const
 get the value of tag-value idx as unsigned short throws if type-checking failed throws if the index is out of range More...
 
void setValue (unsigned short int value, unsigned int idx=0)
 set the value of tag-value idx as unsigned short throws if type-checking failed throws if the index is out of range More...
 
void addValue (unsigned short int value)
 add a value of this tag as unsigned short throws if type-checking failed More...
 
const ValuegetValue (unsigned int idx=0) const
 get the value-object with index idx throws if the index is out of range be careful - no type checking ! More...
 
void setValue (const Value &value, unsigned int idx=0)
 set the value-object with index idx throws if the index is out of range be careful - no type checking ! More...
 
virtual ValueaddValue ()
 add a value and return a reference for further processing be careful - no type checking ! More...
 
virtual 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. More...
 
virtual 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. More...
 
int compare (const Tag &tag, double tolerance=0.0001) const
 Copied from DicomTags (Marcus Barann). More...
 
void setVr (Vr vr)
 Set a new value representation if the VR is unknown. 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...
 

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

make a deep-copy of this

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

get 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

get 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

get 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: