MeVisLab Toolbox Reference
DCMTree::IOParameter Class Referenceabstract

Base class to wrap parameters to be used for reading/writing messages. More...

#include <DCMTree_IOParameter.h>

Public Types

enum  Flags { ReadPixelData = 1 , ReadPixelDataLazily = 2 , ReadPrivateTags = 4 , ConvertToUTF8 = 8 }
 Flags to be OR'd together for create(). More...
 

Public Member Functions

 IOParameter ()
 Constructor. More...
 
 IOParameter (const IOParameter &other)
 Copy constructor. More...
 
virtual void setDicomContent (const std::string &content)=0
 If a DICOM content is set, any further read operation will use this content instead of a filename (which is even resetted inside setDicomContent()). More...
 
virtual std::string filename () const =0
 Returns the name of the file to be read or written. More...
 
virtual const std::string & dicomContent () const =0
 Returns the content of a (virtual) DICOM file. More...
 
virtual std::string pixelBufferFilename () const =0
 Returns the name of the optional pixel buffer file containing the image data to be written. More...
 
virtual int getFlags () const =0
 Returns the flags passed to the constructor. More...
 
virtual bool readPixelData () const =0
 Returns true if the reader should read the binary pixel data. More...
 
virtual bool readPrivateTags () const =0
 Returns true if private tags should be read. More...
 
virtual bool convertToUTF8 () const =0
 Returns true if character should be converted to UTF-8. More...
 
virtual ~IOParameter ()
 Destructor. More...
 
IOParameteroperator= (const IOParameter &other)
 Assignment operator that makes a deep copy. More...
 
virtual void setNumberOfToleratedBadTags (unsigned int numBadTags=5)
 Sets the number of tolerated bad tags that are found in a file before skipping it as bad. More...
 
virtual unsigned int getNumberOfToleratedBadTags () const
 Returns the number of tolerated bad tags that are found in a file before skipping it as bad. More...
 

Static Public Member Functions

static IOParameterPtr create (const std::string &filename, bool readImage=true, bool readPrivateTags=true, bool convertToUTF8=true, const std::string &pixelBufferFilename=std::string())
 Abstract factory create method. More...
 
static IOParameterPtr create (const std::string &filename, int flags, const std::string &pixelBufferFilename=std::string())
 Abstract factory create method. More...
 

Protected Member Functions

virtual IOParameterPtr createConcrete (const std::string &filename, int flags, const std::string &pixelBufferFilename) const =0
 Concrete factory create method of the implementing prototype, called by the abstract one. More...
 

Static Protected Member Functions

static Const_IOParameterPtr prototype ()
 Returns the current concrete prototype. More...
 
static void setPrototype (Const_IOParameterPtr prototype)
 The concrete prototype is set by the implementing DLL. More...
 

Detailed Description

Base class to wrap parameters to be used for reading/writing messages.

This is needed because the toolkits have different capabilities (Merge needs filenames, OFFIS seems to work with streams, too, etc.).

The tags to be processed can be filtered by the additional members of this class. processVR and processTagId shall be used by read/writer implementation to get the correct decision (may be changed to a more practical rule matching). Order of 'rules' is

  • ignore
  • process
  • interval (including first, excluding second)

Definition at line 43 of file DCMTree_IOParameter.h.

Member Enumeration Documentation

◆ Flags

Flags to be OR'd together for create().

Enumerator
ReadPixelData 

Enables loading of pixel data as normal DCMTree::Tag with decompressed image data.

ReadPixelDataLazily 

Enables lazy loading of PixelData as PixelDataTag.

ReadPrivateTags 

Enables reading of private tags.

ConvertToUTF8 

If enabled, converts to character set to UTF-8.

Definition at line 53 of file DCMTree_IOParameter.h.

Constructor & Destructor Documentation

◆ IOParameter() [1/2]

DCMTree::IOParameter::IOParameter ( )

Constructor.

◆ IOParameter() [2/2]

DCMTree::IOParameter::IOParameter ( const IOParameter other)
explicit

Copy constructor.

◆ ~IOParameter()

virtual DCMTree::IOParameter::~IOParameter ( )
virtual

Destructor.

Member Function Documentation

◆ convertToUTF8()

virtual bool DCMTree::IOParameter::convertToUTF8 ( ) const
pure virtual

Returns true if character should be converted to UTF-8.

◆ create() [1/2]

static IOParameterPtr DCMTree::IOParameter::create ( const std::string &  filename,
bool  readImage = true,
bool  readPrivateTags = true,
bool  convertToUTF8 = true,
const std::string &  pixelBufferFilename = std::string() 
)
static

Abstract factory create method.

Parameters
filename- Full path of the input DICOM file.
readImage- If false, pixel data are skipped.
readPrivateTags- If false, private tags are skipped.
convertToUTF8- If true, performs character set conversion.
pixelBufferFilename- Full path of the optional pixel buffer file containing the image data to be written.

◆ create() [2/2]

static IOParameterPtr DCMTree::IOParameter::create ( const std::string &  filename,
int  flags,
const std::string &  pixelBufferFilename = std::string() 
)
static

Abstract factory create method.

Parameters
filename- Full path of the input DICOM file.
flags- Combination of Flags enum.
pixelBufferFilename- Full path of the optional pixel buffer file containing the image data to be written.

◆ createConcrete()

virtual IOParameterPtr DCMTree::IOParameter::createConcrete ( const std::string &  filename,
int  flags,
const std::string &  pixelBufferFilename 
) const
protectedpure virtual

Concrete factory create method of the implementing prototype, called by the abstract one.

Parameters
filename- Full path of the input DICOM file.
flags- OR'd flags
pixelBufferFilename- Full path of the optional pixel buffer file containing the image data to be written.

◆ dicomContent()

virtual const std::string& DCMTree::IOParameter::dicomContent ( ) const
pure virtual

Returns the content of a (virtual) DICOM file.

◆ filename()

virtual std::string DCMTree::IOParameter::filename ( ) const
pure virtual

Returns the name of the file to be read or written.

◆ getFlags()

virtual int DCMTree::IOParameter::getFlags ( ) const
pure virtual

Returns the flags passed to the constructor.

◆ getNumberOfToleratedBadTags()

virtual unsigned int DCMTree::IOParameter::getNumberOfToleratedBadTags ( ) const
virtual

Returns the number of tolerated bad tags that are found in a file before skipping it as bad.

◆ operator=()

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

Assignment operator that makes a deep copy.

◆ pixelBufferFilename()

virtual std::string DCMTree::IOParameter::pixelBufferFilename ( ) const
pure virtual

Returns the name of the optional pixel buffer file containing the image data to be written.

◆ prototype()

static Const_IOParameterPtr DCMTree::IOParameter::prototype ( )
staticprotected

Returns the current concrete prototype.

◆ readPixelData()

virtual bool DCMTree::IOParameter::readPixelData ( ) const
pure virtual

Returns true if the reader should read the binary pixel data.

◆ readPrivateTags()

virtual bool DCMTree::IOParameter::readPrivateTags ( ) const
pure virtual

Returns true if private tags should be read.

◆ setDicomContent()

virtual void DCMTree::IOParameter::setDicomContent ( const std::string &  content)
pure virtual

If a DICOM content is set, any further read operation will use this content instead of a filename (which is even resetted inside setDicomContent()).

◆ setNumberOfToleratedBadTags()

virtual void DCMTree::IOParameter::setNumberOfToleratedBadTags ( unsigned int  numBadTags = 5)
virtual

Sets the number of tolerated bad tags that are found in a file before skipping it as bad.

◆ setPrototype()

static void DCMTree::IOParameter::setPrototype ( Const_IOParameterPtr  prototype)
staticprotected

The concrete prototype is set by the implementing DLL.


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