MeVisLab Toolbox Reference
DCMTree::IOParameter Class Referenceabstract

base class to wrap parameters to be used for reading/writing messages this is needed because the toolkits have different capabilities (merge needs file-names, offis seems to work with streams too etc.) More...

#include <DCMTree_IOParameter.h>

Public Types

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

Public Member Functions

 IOParameter ()
 ctor
 
 IOParameter (const IOParameter &other)
 copy - ctor
 
virtual std::string filename () const =0
 name of the file to be read or written
 
virtual std::string pixelBufferFilename () const =0
 name of the optional pixel buffer file containing the image data to be written
 
virtual int getFlags () const =0
 Returns the flags passed to the constructor.
 
virtual bool readPixelData () const =0
 true if the reader should read the binary pixel data
 
virtual bool readPrivateTags () const =0
 true if private tags should be read
 
virtual bool convertToUTF8 () const =0
 true if character should be converted to UTF8
 
virtual ~IOParameter ()
 dtor
 
IOParameteroperator= (const IOParameter &other)
 assignment operator (makes deep copy)
 
virtual void setNumberOfToleratedBadTags (unsigned int numBadTags=5)
 set number of tolerated bad tags which are found in a file before skipping it as bad
 
virtual unsigned int getNumberOfToleratedBadTags () const
 returns number of tolerated bad tags which are found in a file before skipping it as bad
 

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
 
static IOParameterPtr create (const std::string &filename, int flags, const std::string &pixelBufferFilename=std::string())
 abstract factory create method
 

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
 

Static Protected Member Functions

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

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 file-names, 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 right decision (may be changed to a more practical rule-matching) order of 'rules' is

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

Definition at line 56 of file DCMTree_IOParameter.h.

Member Enumeration Documentation

◆ Flags

Flags to be or'ed 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, convert to character set to UTF8.

Definition at line 66 of file DCMTree_IOParameter.h.

Constructor & Destructor Documentation

◆ IOParameter() [1/2]

DCMTree::IOParameter::IOParameter ( )

ctor

◆ IOParameter() [2/2]

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

copy - ctor

◆ ~IOParameter()

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

dtor

Member Function Documentation

◆ convertToUTF8()

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

true if character should be converted to UTF8

◆ 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, do 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'ed Flags
pixelBufferFilename- full path of the optional pixel buffer file containing the image data to be written

◆ filename()

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

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 number of tolerated bad tags which are found in a file before skipping it as bad

◆ operator=()

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

assignment operator (makes deep copy)

◆ pixelBufferFilename()

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

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

◆ prototype()

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

the current concrete prototype

◆ readPixelData()

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

true if the reader should read the binary pixel data

◆ readPrivateTags()

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

true if private tags should be read

◆ setNumberOfToleratedBadTags()

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

set number of tolerated bad tags which 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: