MeVisLab Toolbox Reference
DCMTree::CharacterSetConverter Class Referenceabstract

The class CharacterSetConverter is used for converting string values from one DICOM character set to another; character set names are those specified for the SpecificCharacterSet DICOM tag. More...

#include <DCMTree_CharacterSetConverter.h>

Classes

class  Factory
 Factory class must be installed by the implementing DLL. More...
 

Public Member Functions

virtual ~CharacterSetConverter ()
 Destructor.
 
virtual bool convert (std::string &value, const DCMTree::TagInfo &tagInfo) const =0
 Converts the string to the new character set, returns false if the conversion had errors.
 

Static Public Member Functions

static CharacterSetConverterPtr create (const std::string &originalcharacterset, const std::string &newcharacterset, DCMTree_Utils::LoadLibraryDelegate *delegate=nullptr)
 Creates a CharacterSetConverter for the given pair of encodings.
 

Protected Types

typedef boost::shared_ptr< FactoryFactoryPtr
 

Static Protected Member Functions

static void setFactory (FactoryPtr factory)
 The concrete singleton is set by the implementing DLL.
 

Detailed Description

The class CharacterSetConverter is used for converting string values from one DICOM character set to another; character set names are those specified for the SpecificCharacterSet DICOM tag.

Definition at line 42 of file DCMTree_CharacterSetConverter.h.

Member Typedef Documentation

◆ FactoryPtr

Definition at line 80 of file DCMTree_CharacterSetConverter.h.

Constructor & Destructor Documentation

◆ ~CharacterSetConverter()

virtual DCMTree::CharacterSetConverter::~CharacterSetConverter ( )
virtual

Destructor.

Member Function Documentation

◆ convert()

virtual bool DCMTree::CharacterSetConverter::convert ( std::string & value,
const DCMTree::TagInfo & tagInfo ) const
pure virtual

Converts the string to the new character set, returns false if the conversion had errors.

However, the conversion will still be performed as far as possible.

◆ create()

static CharacterSetConverterPtr DCMTree::CharacterSetConverter::create ( const std::string & originalcharacterset,
const std::string & newcharacterset,
DCMTree_Utils::LoadLibraryDelegate * delegate = nullptr )
static

Creates a CharacterSetConverter for the given pair of encodings.

It will return an identity conversion if both new and original character set name are the same. It will return NULL if the conversion is not supported.

Note: conversions between ASCII, Latin1, and UTF-8 are supported independent of the implementing toolkit (legacy support).

◆ setFactory()

static void DCMTree::CharacterSetConverter::setFactory ( FactoryPtr factory)
staticprotected

The concrete singleton is set by the implementing DLL.


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