DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
base class for DICOM elements with value representation LO, LT, PN, SH, ST, UT More...
Public Member Functions | |
DcmCharString (const DcmTag &tag, const Uint32 len) | |
constructor. | |
DcmCharString (const DcmCharString &old) | |
copy constructor | |
virtual | ~DcmCharString () |
destructor | |
DcmCharString & | operator= (const DcmCharString &obj) |
assignment operator | |
virtual DcmObject * | clone () const |
clone method | |
virtual OFCondition | copyFrom (const DcmObject &rhs) |
Virtual object copying. | |
virtual OFCondition | verify (const OFBool autocorrect=OFFalse) |
check the currently stored string value. | |
virtual OFBool | containsExtendedCharacters (const OFBool checkAllStrings=OFFalse) |
check if this element contains non-ASCII characters. | |
virtual OFBool | isAffectedBySpecificCharacterSet () const |
check if this element is affected by SpecificCharacterSet | |
virtual OFCondition | convertCharacterSet (DcmSpecificCharacterSet &converter) |
convert this element value from the currently selected source character set to the currently selected destination character set | |
Protected Member Functions | |
void | setDelimiterChars (const OFString &characters) |
delimiter characters specifying when to switch back to the default character set (in case code extension techniques like ISO 2022 are used) | |
Private Attributes | |
OFString | delimiterChars |
delimiter characters specifying when to switch back to the default character set (in case code extension techniques like ISO 2022 are used) |
base class for DICOM elements with value representation LO, LT, PN, SH, ST, UT
DcmCharString::DcmCharString | ( | const DcmTag & | tag, |
const Uint32 | len | ||
) |
constructor.
Create new element from given tag and length.
tag | DICOM tag for the new element |
len | value length for the new element |
DcmCharString::DcmCharString | ( | const DcmCharString & | old | ) |
copy constructor
old | element to be copied |
virtual DcmObject* DcmCharString::clone | ( | ) | const [inline, virtual] |
clone method
Reimplemented from DcmByteString.
Reimplemented in DcmLongString, DcmPersonName, DcmShortString, DcmShortText, DcmUnlimitedText, and DcmLongText.
virtual OFBool DcmCharString::containsExtendedCharacters | ( | const OFBool | checkAllStrings = OFFalse | ) | [virtual] |
check if this element contains non-ASCII characters.
Please note that this check is pretty simple and only works for single-byte character sets that do include the 7-bit ASCII codes, e.g. for the ISO 8859 family. In other words: All character codes below 128 are considered to be ASCII codes and all others are considered to be non-ASCII.
checkAllStrings | not used in this class |
Reimplemented from DcmByteString.
virtual OFCondition DcmCharString::convertCharacterSet | ( | DcmSpecificCharacterSet & | converter | ) | [virtual] |
convert this element value from the currently selected source character set to the currently selected destination character set
converter | character set converter to be used to convert the element value |
Reimplemented from DcmObject.
virtual OFCondition DcmCharString::copyFrom | ( | const DcmObject & | rhs | ) | [virtual] |
Virtual object copying.
This method can be used for DcmObject and derived classes to get a deep copy of an object. Internally the assignment operator is called if the given DcmObject parameter is of the same type as "this" object instance. If not, an error is returned. This function permits copying an object by value in a virtual way which therefore is different to just calling the assignment operator of DcmElement which could result in slicing the object.
rhs | - [in] The instance to copy from. Has to be of the same class type as "this" object |
Reimplemented from DcmByteString.
Reimplemented in DcmLongString, DcmPersonName, DcmShortString, DcmShortText, DcmUnlimitedText, and DcmLongText.
virtual OFBool DcmCharString::isAffectedBySpecificCharacterSet | ( | ) | const [virtual] |
check if this element is affected by SpecificCharacterSet
Reimplemented from DcmByteString.
DcmCharString& DcmCharString::operator= | ( | const DcmCharString & | obj | ) |
assignment operator
obj | element to be assigned/copied |
void DcmCharString::setDelimiterChars | ( | const OFString & | characters | ) | [inline, protected] |
delimiter characters specifying when to switch back to the default character set (in case code extension techniques like ISO 2022 are used)
characters | delimiter characters to be used for character set conversion |
virtual OFCondition DcmCharString::verify | ( | const OFBool | autocorrect = OFFalse | ) | [virtual] |
check the currently stored string value.
Checks every string component for the maximum length specified for the particular value representation.
autocorrect | correct value and value component length if OFTrue. NB: This parameter does currently nothing since it is unknown to this class whether a character consists of one or more bytes. To be fixed in a future version when multi-byte character sets are (hopefully) supported. |
Reimplemented from DcmByteString.