Inheritance diagram for DcmPolymorphOBOW:
Public Member Functions | |
DcmPolymorphOBOW (const DcmTag &tag, const Uint32 len=0) | |
constructor | |
DcmPolymorphOBOW (const DcmPolymorphOBOW &old) | |
copy constructor | |
virtual | ~DcmPolymorphOBOW () |
destructor | |
DcmPolymorphOBOW & | operator= (const DcmPolymorphOBOW &obj) |
copy assignment operator | |
virtual DcmObject * | clone () const |
clone method | |
virtual OFCondition | copyFrom (const DcmObject &rhs) |
Virtual object copying. | |
virtual OFCondition | read (DcmInputStream &inStream, const E_TransferSyntax ixfer, const E_GrpLenEncoding glenc, const Uint32 maxReadLength) |
This function reads the data value of an attribute which is captured in the input stream and captures this information in this. | |
virtual OFCondition | write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache) |
This function writes this element's value to the outstream which was passed. | |
virtual OFCondition | writeSignatureFormat (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache) |
special write method for creation of digital signatures | |
virtual void | transferInit () |
initialize the transfer state of this object. | |
virtual void | transferEnd () |
finalize the transfer state of this object. | |
virtual OFCondition | getUint8Array (Uint8 *&val) |
get a pointer to the element value of the current element as type string. | |
virtual OFCondition | getUint16Array (Uint16 *&val) |
get a pointer to the element value of the current element as type Uint16. | |
virtual OFCondition | putUint8Array (const Uint8 *vals, const unsigned long num) |
replace the element value by a copy of the given Uint8 array (which is possibly multi-valued). | |
virtual OFCondition | putUint16Array (const Uint16 *vals, const unsigned long num) |
replace the element value by a copy of the given Uint16 array (which is possibly multi-valued). | |
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. | |
Private Attributes | |
OFBool | changeVR |
this flag is used during write operations in Implicit VR Little Endian and notes that the VR has temporarily been changed from OB to OW at the beginning to the write operation and needs to be changed back once the operation has finished. | |
DcmEVR | currentVR |
the current VR of value field, which can change over time |
are polymorph.
Definition at line 41 of file dcvrpobw.h.
DcmPolymorphOBOW::DcmPolymorphOBOW | ( | const DcmTag & | tag, | |
const Uint32 | len = 0 | |||
) |
DcmPolymorphOBOW& DcmPolymorphOBOW::operator= | ( | const DcmPolymorphOBOW & | obj | ) |
copy assignment operator
obj | element to be copied |
Referenced by DcmOverlayData::operator=().
virtual DcmObject* DcmPolymorphOBOW::clone | ( | ) | const [inline, virtual] |
clone method
Reimplemented from DcmOtherByteOtherWord.
Reimplemented in DcmOverlayData, and DcmPixelData.
Definition at line 69 of file dcvrpobw.h.
References DcmPolymorphOBOW().
virtual OFCondition DcmPolymorphOBOW::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 DcmOtherByteOtherWord.
Reimplemented in DcmOverlayData, and DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::read | ( | DcmInputStream & | inStream, | |
const E_TransferSyntax | ixfer, | |||
const E_GrpLenEncoding | glenc, | |||
const Uint32 | maxReadLength | |||
) | [virtual] |
This function reads the data value of an attribute which is captured in the input stream and captures this information in this.
If not all information for an attribute could be read from the stream, the function returns EC_StreamNotifyClient. Note that if certain conditions are met, this function does not actually load the data value but creates and stores an object that enables us to load this information later.
inStream | The stream which contains the information. | |
ixfer | The transfer syntax which was used to encode the information in inStream. | |
glenc | Encoding type for group length; specifies what will be done with group length tags. | |
maxReadLength | Maximum read length for reading an attribute value. |
Reimplemented from DcmElement.
Reimplemented in DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::write | ( | DcmOutputStream & | outStream, | |
const E_TransferSyntax | oxfer, | |||
const E_EncodingType | enctype, | |||
DcmWriteCache * | wcache | |||
) | [virtual] |
This function writes this element's value to the outstream which was passed.
When writing information, the byte ordering (little or big endian) of the transfer syntax which was passed will be accounted for. In case the outstream does not provide enough space for all bytes of the current element's value, only a certain part of the value will be written to the stream. This element's transfer state indicates if the all bytes of value have already been written to the stream (ERW_ready), if the writing is still in progress and more bytes need to be written to the stream (ERW_inWork) or if the writing of the bytes of this element's value has not even begun yet (ERW_init). The member variable fTransferredBytes indicates how many bytes (starting from byte 0) of this element's value have already been written to the stream. This function will return EC_Normal, if the entire value of this element has been written to the stream, it will return EC_StreamNotifyClient, if there is no more space in the buffer and _not_ all bytes of this element's value have been written, and it will return some other (error) value if there was an error.
outStream | The stream the information will be written to. | |
oxfer | The transfer syntax which shall be used. | |
enctype | encoding types (undefined or explicit length) (actually unused) | |
wcache | pointer to write cache object, may be NULL |
Reimplemented from DcmOtherByteOtherWord.
Reimplemented in DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::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 DcmOtherByteOtherWord.
Reimplemented in DcmPixelData.
virtual void DcmPolymorphOBOW::transferInit | ( | ) | [virtual] |
initialize the transfer state of this object.
This method must be called before this object is written to a stream or read (parsed) from a stream.
Reimplemented from DcmElement.
Reimplemented in DcmPixelData.
virtual void DcmPolymorphOBOW::transferEnd | ( | ) | [virtual] |
finalize the transfer state of this object.
This method must be called when reading/writing this object from/to a stream has been completed.
Reimplemented from DcmObject.
Reimplemented in DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::getUint8Array | ( | Uint8 *& | val | ) | [virtual] |
get a pointer to the element value of the current element as type string.
Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.
val | pointer to value returned in this parameter upon success |
Reimplemented from DcmOtherByteOtherWord.
virtual OFCondition DcmPolymorphOBOW::getUint16Array | ( | Uint16 *& | val | ) | [virtual] |
get a pointer to the element value of the current element as type Uint16.
Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.
val | pointer to value returned in this parameter upon success |
Reimplemented from DcmOtherByteOtherWord.
virtual OFCondition DcmPolymorphOBOW::putUint8Array | ( | const Uint8 * | vals, | |
const unsigned long | num | |||
) | [virtual] |
replace the element value by a copy of the given Uint8 array (which is possibly multi-valued).
Requires element to be of corresponding VR, otherwise an error is returned.
vals | new attribute value | |
num | number of values in array vals |
Reimplemented from DcmOtherByteOtherWord.
Reimplemented in DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::putUint16Array | ( | const Uint16 * | vals, | |
const unsigned long | num | |||
) | [virtual] |
replace the element value by a copy of the given Uint16 array (which is possibly multi-valued).
Requires element to be of corresponding VR, otherwise an error is returned.
vals | new attribute value | |
num | number of values in array vals |
Reimplemented from DcmOtherByteOtherWord.
Reimplemented in DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::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 certain VRs, e.g. OB.
numBytes | number of bytes (8 bit) to be created | |
bytes | stores the pointer to the resulting buffer |
Reimplemented from DcmOtherByteOtherWord.
Reimplemented in DcmPixelData.
virtual OFCondition DcmPolymorphOBOW::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 DcmOtherByteOtherWord.
Reimplemented in DcmPixelData.