Inheritance diagram for DcmOtherByteOtherWord:
Public Member Functions | |
DcmOtherByteOtherWord (const DcmTag &tag, const Uint32 len=0) | |
constructor. | |
DcmOtherByteOtherWord (const DcmOtherByteOtherWord &old) | |
copy constructor | |
virtual | ~DcmOtherByteOtherWord () |
destructor | |
DcmOtherByteOtherWord & | operator= (const DcmOtherByteOtherWord &obj) |
assignment operator | |
virtual DcmObject * | clone () const |
clone method | |
virtual OFCondition | copyFrom (const DcmObject &rhs) |
Virtual object copying. | |
virtual DcmEVR | ident () const |
get element type identifier | |
virtual OFCondition | checkValue (const OFString &vm="", const OFBool oldFormat=OFFalse) |
check whether stored value conforms to the VR and to the specified VM | |
virtual unsigned long | getVM () |
get value multiplicity | |
virtual OFCondition | setVR (DcmEVR vr) |
set/change the current value representation | |
virtual void | print (STD_NAMESPACE ostream &out, const size_t flags=0, const int level=0, const char *pixelFileName=NULL, size_t *pixelCounter=NULL) |
print the current value to a stream. | |
virtual OFBool | canWriteXfer (const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer) |
check whether the transfer syntax can be changed as specified | |
virtual OFCondition | write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache) |
write object to a stream | |
virtual OFCondition | writeXML (STD_NAMESPACE ostream &out, const size_t flags=0) |
write object in XML format to a stream | |
virtual OFCondition | writeSignatureFormat (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache) |
special write method for creation of digital signatures | |
virtual OFCondition | getUint8 (Uint8 &byteVal, const unsigned long pos=0) |
get particular 8 bit value. | |
virtual OFCondition | getUint16 (Uint16 &wordVal, const unsigned long pos=0) |
get particular 16 bit value. | |
virtual OFCondition | getUint8Array (Uint8 *&byteVals) |
get reference to stored 8 bit data. | |
virtual OFCondition | getUint16Array (Uint16 *&wordVals) |
get reference to stored 16 bit data. | |
virtual OFCondition | getOFString (OFString &stringVal, const unsigned long pos, OFBool normalize=OFTrue) |
get a particular value as a character string. | |
virtual OFCondition | getOFStringArray (OFString &stringVal, OFBool normalize=OFTrue) |
get element value as a character string. | |
virtual OFCondition | putUint8Array (const Uint8 *byteValue, const unsigned long numBytes) |
set element value to given 8 bit data. | |
virtual OFCondition | putUint16Array (const Uint16 *wordValue, const unsigned long numWords) |
set element value to given 16 bit data. | |
virtual OFCondition | createUint8Array (const Uint32 numBytes, Uint8 *&bytes) |
create an empty Uint8 array of given number of bytes and set it. | |
virtual OFCondition | createUint16Array (const Uint32 numWords, Uint16 *&words) |
create an empty Uint16 array of given number of words and set it. | |
virtual OFCondition | putString (const char *stringVal) |
set element value from the given character string. | |
virtual OFCondition | verify (const OFBool autocorrect=OFFalse) |
check the currently stored element value | |
Protected Member Functions | |
virtual void | postLoadValue () |
method is called after the element value has been loaded. | |
OFCondition | alignValue () |
align the element value to an even length (padding) | |
void | printPixel (STD_NAMESPACE ostream &out, const size_t flags, const int level, const char *pixelFileName, size_t *pixelCounter) |
print pixel data and optionally write it to a binary file. | |
Private Attributes | |
OFBool | compactAfterTransfer |
this flag is used during write operations and indicates that compact() should be called once the write operation finishes. |
Definition at line 40 of file dcvrobow.h.
DcmOtherByteOtherWord::DcmOtherByteOtherWord | ( | const DcmTag & | tag, | |
const Uint32 | len = 0 | |||
) |
constructor.
Create new element from given tag and length.
tag | DICOM tag for the new element | |
len | value length for the new element |
Referenced by clone().
DcmOtherByteOtherWord::DcmOtherByteOtherWord | ( | const DcmOtherByteOtherWord & | old | ) |
copy constructor
old | element to be copied |
DcmOtherByteOtherWord& DcmOtherByteOtherWord::operator= | ( | const DcmOtherByteOtherWord & | obj | ) |
assignment operator
obj | element to be assigned/copied |
Referenced by DcmPixelItem::operator=().
virtual DcmObject* DcmOtherByteOtherWord::clone | ( | ) | const [inline, virtual] |
clone method
Implements DcmObject.
Reimplemented in DcmOverlayData, DcmPixelData, DcmPixelItem, and DcmPolymorphOBOW.
Definition at line 72 of file dcvrobow.h.
References DcmOtherByteOtherWord().
virtual OFCondition DcmOtherByteOtherWord::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 DcmElement.
Reimplemented in DcmOverlayData, DcmPixelData, DcmPixelItem, and DcmPolymorphOBOW.
virtual DcmEVR DcmOtherByteOtherWord::ident | ( | ) | const [virtual] |
get element type identifier
Implements DcmObject.
Reimplemented in DcmOverlayData, DcmPixelData, and DcmPixelItem.
virtual OFCondition DcmOtherByteOtherWord::checkValue | ( | const OFString & | vm = "" , |
|
const OFBool | oldFormat = OFFalse | |||
) | [virtual] |
check whether stored value conforms to the VR and to the specified VM
vm | parameter not used for this VR | |
oldFormat | parameter not used for this VR (only for DA, TM, PN) |
Reimplemented from DcmElement.
virtual unsigned long DcmOtherByteOtherWord::getVM | ( | ) | [virtual] |
get value multiplicity
Implements DcmObject.
virtual OFCondition DcmOtherByteOtherWord::setVR | ( | DcmEVR | vr | ) | [virtual] |
set/change the current value representation
vr | new value representation to be set. All VRs except for OW (Other Word String) are treated as 8 bit data (OB). This is particularily useful for unknown (UN) or unsupported VRs. |
Reimplemented from DcmObject.
Reimplemented in DcmPixelData.
virtual void DcmOtherByteOtherWord::print | ( | STD_NAMESPACE ostream & | out, | |
const size_t | flags = 0 , |
|||
const int | level = 0 , |
|||
const char * | pixelFileName = NULL , |
|||
size_t * | pixelCounter = NULL | |||
) | [virtual] |
print the current value to a stream.
The output format of the binary value is a backslash separated sequence of 2- or 4-digit hex numbers, e.g. "00\01\dd" or "0000\7777\aaaa\ffff".
out | output stream | |
flags | optional flag used to customize the output (see DCMTypes::PF_xxx) | |
level | current level of nested items. Used for indentation. | |
pixelFileName | not used | |
pixelCounter | not used |
Implements DcmObject.
Reimplemented in DcmPixelData, and DcmPixelItem.
virtual OFBool DcmOtherByteOtherWord::canWriteXfer | ( | const E_TransferSyntax | newXfer, | |
const E_TransferSyntax | oldXfer | |||
) | [virtual] |
check whether the transfer syntax can be changed as specified
newXfer | transfer syntax to be checked | |
oldXfer | not used |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData.
virtual OFCondition DcmOtherByteOtherWord::write | ( | DcmOutputStream & | outStream, | |
const E_TransferSyntax | oxfer, | |||
const E_EncodingType | enctype, | |||
DcmWriteCache * | wcache | |||
) | [virtual] |
write object to a stream
outStream | DICOM output stream | |
oxfer | output transfer syntax | |
enctype | encoding types (undefined or explicit length) | |
wcache | pointer to write cache object, may be NULL |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, and DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::writeXML | ( | STD_NAMESPACE ostream & | out, | |
const size_t | flags = 0 | |||
) | [virtual] |
write object in XML format to a stream
out | output stream to which the XML document is written | |
flags | optional flag used to customize the output (see DCMTypes::XF_xxx) |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, and DcmPixelItem.
virtual OFCondition DcmOtherByteOtherWord::writeSignatureFormat | ( | DcmOutputStream & | outStream, | |
const E_TransferSyntax | oxfer, | |||
const E_EncodingType | enctype, | |||
DcmWriteCache * | wcache | |||
) | [virtual] |
special write method for creation of digital signatures
outStream | DICOM output stream | |
oxfer | output transfer syntax | |
enctype | encoding types (undefined or explicit length) | |
wcache | pointer to write cache object, may be NULL |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, DcmPixelItem, and DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::getUint8 | ( | Uint8 & | byteVal, | |
const unsigned long | pos = 0 | |||
) | [virtual] |
get particular 8 bit value.
This method is only applicable to non-OW data, e.g. OB.
byteVal | reference to result variable (cleared in case of error) | |
pos | index of the value to be retrieved (0..vm-1) |
Reimplemented from DcmElement.
virtual OFCondition DcmOtherByteOtherWord::getUint16 | ( | Uint16 & | wordVal, | |
const unsigned long | pos = 0 | |||
) | [virtual] |
get particular 16 bit value.
This method is only applicable to OW data.
wordVal | reference to result variable (cleared in case of error) | |
pos | index of the value to be retrieved (0..vm-1) |
Reimplemented from DcmElement.
virtual OFCondition DcmOtherByteOtherWord::getUint8Array | ( | Uint8 *& | byteVals | ) | [virtual] |
get reference to stored 8 bit data.
This method is only applicable to non-OW data, e.g. OB.
byteVals | reference to result variable |
Reimplemented from DcmElement.
Reimplemented in DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::getUint16Array | ( | Uint16 *& | wordVals | ) | [virtual] |
get reference to stored 16 bit data.
This method is only applicable to OW data.
wordVals | reference to result variable |
Reimplemented from DcmElement.
Reimplemented in DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::getOFString | ( | OFString & | stringVal, | |
const unsigned long | pos, | |||
OFBool | normalize = OFTrue | |||
) | [virtual] |
get a particular value as a character string.
The numeric value is converted to hex mode, i.e. an 8 bit value is represented by 2 characters (00..ff) and a 16 bit value by 4 characters (0000..ffff).
stringVal | variable in which the result value is stored | |
pos | index of the value in case of multi-valued elements (0..vm-1) | |
normalize | not used |
Reimplemented from DcmElement.
virtual OFCondition DcmOtherByteOtherWord::getOFStringArray | ( | OFString & | stringVal, | |
OFBool | normalize = OFTrue | |||
) | [virtual] |
get element value as a character string.
The numeric values are converted to hex mode, i.e. an 8 bit value is represented by 2 characters (00..ff) and a 16 bit value by 4 characters (0000..ffff). In case of VM > 1 the single values are separated by a backslash ('\').
stringVal | variable in which the result value is stored | |
normalize | not used |
Reimplemented from DcmElement.
virtual OFCondition DcmOtherByteOtherWord::putUint8Array | ( | const Uint8 * | byteValue, | |
const unsigned long | numBytes | |||
) | [virtual] |
set element value to given 8 bit data.
This method is only applicable to non-OW data, e.g. OB.
byteValue | 8 bit data to be set (copied) | |
numBytes | number of bytes (8 bit) to be set |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, and DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::putUint16Array | ( | const Uint16 * | wordValue, | |
const unsigned long | numWords | |||
) | [virtual] |
set element value to given 16 bit data.
This method is only applicable to OW data.
wordValue | 16 bit data to be set (copied) | |
numWords | number of words (16 bit) to be set. Local byte-ordering expected. |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, and DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::createUint8Array | ( | const Uint32 | numBytes, | |
Uint8 *& | bytes | |||
) | [virtual] |
create an empty Uint8 array of given number of bytes and set it.
All array elements are initialized with a value of 0 (using 'memzero'). This method is only applicable to non-OW data, e.g. OB.
numBytes | number of bytes (8 bit) to be created | |
bytes | stores the pointer to the resulting buffer |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, and DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::createUint16Array | ( | const Uint32 | numWords, | |
Uint16 *& | words | |||
) | [virtual] |
create an empty Uint16 array of given number of words and set it.
All array elements are initialized with a value of 0 (using 'memzero'). This method is only applicable to OW data.
numWords | number of words (16 bit) to be created | |
words | stores the pointer to the resulting buffer |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData, and DcmPolymorphOBOW.
virtual OFCondition DcmOtherByteOtherWord::putString | ( | const char * | stringVal | ) | [virtual] |
set element value from the given character string.
The input string is expected to have the same format as described for 'getOFStringArray()' above, i.e. a backslash separated sequence of hexa-decimal numbers.
stringVal | input character string |
Reimplemented from DcmElement.
virtual OFCondition DcmOtherByteOtherWord::verify | ( | const OFBool | autocorrect = OFFalse |
) | [virtual] |
check the currently stored element value
autocorrect | correct value padding (even length) if OFTrue |
Implements DcmObject.
virtual void DcmOtherByteOtherWord::postLoadValue | ( | ) | [protected, virtual] |
method is called after the element value has been loaded.
Can be used to correct the value before it is used for the first time.
Reimplemented from DcmElement.
OFCondition DcmOtherByteOtherWord::alignValue | ( | ) | [protected] |
align the element value to an even length (padding)
void DcmOtherByteOtherWord::printPixel | ( | STD_NAMESPACE ostream & | out, | |
const size_t | flags, | |||
const int | level, | |||
const char * | pixelFileName, | |||
size_t * | pixelCounter | |||
) | [protected] |
print pixel data and optionally write it to a binary file.
Optional pixel data file is always written in little endian byte-ordering.
out | output stream | |
flags | optional flag used to customize the output (see DCMTypes::PF_xxx) | |
level | current level of nested items. Used for indentation. | |
pixelFileName | optional filename used to write the raw pixel data file | |
pixelCounter | optional counter used for automatic pixel data filename creation |