MeVisLab Toolbox Reference
DCMTree::CharacterSetConverter Class Referenceabstract

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 implementing DLL More...
 

Public Member Functions

virtual ~CharacterSetConverter ()
 dtor More...
 
virtual bool convert (std::string &value, const DCMTree::TagInfo &tagInfo) const =0
 convert the string to the new character set, returns false if the conversion had errors (but the conversion will still be performed as far as possible) More...
 

Static Public Member Functions

static CharacterSetConverterPtr create (const std::string &originalcharacterset, const std::string &newcharacterset, DCMTree_Utils::LoadLibraryDelegate *delegate=nullptr)
 create a CharacterSetConverter for the given pair of encodings; will return an identity conversion if both new and original character set name are the same; will return NULL if the conversion is not supported More...
 

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. More...
 

Detailed Description

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

typedef boost::shared_ptr<Factory> DCMTree::CharacterSetConverter::FactoryPtr
protected

Definition at line 80 of file DCMTree_CharacterSetConverter.h.

Constructor & Destructor Documentation

◆ ~CharacterSetConverter()

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

dtor

Member Function Documentation

◆ convert()

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

convert the string to the new character set, returns false if the conversion had errors (but 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

create a CharacterSetConverter for the given pair of encodings; will return an identity conversion if both new and original character set name are the same; will return NULL if the conversion is not supported

Note: conversions between ASCII, Latin1 and UTF8 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: