DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions
DcmPixelItem Class Reference

this class implements a container for a fragment of compressed pixel data. More...

+ Inheritance diagram for DcmPixelItem:

List of all members.

Public Member Functions

 DcmPixelItem (const DcmTag &tag, const Uint32 len=0)
 constructor
 DcmPixelItem (const DcmPixelItem &old)
 copy constructor
virtual ~DcmPixelItem ()
 destructor
DcmPixelItemoperator= (const DcmPixelItem &obj)
 copy assignment operator
virtual DcmObjectclone () const
 clone method
virtual DcmEVR ident (void) const
 get type identifier
virtual OFCondition copyFrom (const DcmObject &rhs)
 Virtual object copying.
virtual DcmItemgetParentItem ()
 get parent item of this object, i.e. the item/dataset in which the surrounding pixel sequence is stored.
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 all elements of the item to a stream
virtual OFCondition createOffsetTable (const DcmOffsetList &offsetList)
 creates in this object an offset table for a compressed pixel sequence.
virtual OFCondition writeXML (STD_NAMESPACE ostream &out, const size_t flags=0)
 write object in XML format
virtual OFCondition writeSignatureFormat (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache)
 special write method for creation of digital signatures

Protected Member Functions

virtual OFCondition writeTagAndLength (DcmOutputStream &outStream, const E_TransferSyntax oxfer, Uint32 &writtenBytes) const
 write tag, VR and length field to the given output stream

Detailed Description

this class implements a container for a fragment of compressed pixel data.

Instances of this class use the same attribute tags as sequence items, but are maintained within a pixel data element (class DcmPixelSequence) with undefined length and contain no DICOM structure, but raw data. Therefore, this class is derived from DcmOtherByteOtherWord, the class that is used for OB raw data which is handled very similar.


Constructor & Destructor Documentation

DcmPixelItem::DcmPixelItem ( const DcmTag tag,
const Uint32  len = 0 
)

constructor

Parameters:
tagattribute tag
lenlength of the attribute value

copy constructor

Parameters:
oldelement to be copied

Member Function Documentation

virtual DcmObject* DcmPixelItem::clone ( ) const [inline, virtual]

clone method

Returns:
deep copy of this object

Reimplemented from DcmOtherByteOtherWord.

virtual OFCondition DcmPixelItem::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.

Parameters:
rhs- [in] The instance to copy from. Has to be of the same class type as "this" object
Returns:
EC_Normal if copying was successful, error otherwise

Reimplemented from DcmOtherByteOtherWord.

virtual OFCondition DcmPixelItem::createOffsetTable ( const DcmOffsetList offsetList) [virtual]

creates in this object an offset table for a compressed pixel sequence.

Parameters:
offsetListlist of size entries for each individual encoded frame provided by the compression codec. All entries are expected to have an even value (i.e. the pixel items are padded).
Returns:
EC_Normal if successful, an error code otherwise
virtual DcmItem* DcmPixelItem::getParentItem ( ) [virtual]

get parent item of this object, i.e. the item/dataset in which the surrounding pixel sequence is stored.

Returns:
pointer to the parent item of this object (might be NULL)

Reimplemented from DcmObject.

virtual DcmEVR DcmPixelItem::ident ( void  ) const [inline, virtual]

get type identifier

Returns:
type identifier of this class (EVR_item)

Reimplemented from DcmOtherByteOtherWord.

DcmPixelItem& DcmPixelItem::operator= ( const DcmPixelItem obj) [inline]

copy assignment operator

Parameters:
objelement to be copied
virtual void DcmPixelItem::print ( STD_NAMESPACE ostream &  out,
const size_t  flags = 0,
const int  level = 0,
const char *  pixelFileName = NULL,
size_t *  pixelCounter = NULL 
) [virtual]

print all elements of the item to a stream

Parameters:
outoutput stream
flagsoptional flag used to customize the output (see DCMTypes::PF_xxx)
levelcurrent level of nested items. Used for indentation.
pixelFileNameoptional filename used to write the raw pixel data file
pixelCounteroptional counter used for automatic pixel data filename creation

Reimplemented from DcmOtherByteOtherWord.

virtual OFCondition DcmPixelItem::writeSignatureFormat ( DcmOutputStream outStream,
const E_TransferSyntax  oxfer,
const E_EncodingType  enctype,
DcmWriteCache wcache 
) [virtual]

special write method for creation of digital signatures

Parameters:
outStreamDICOM output stream
oxferoutput transfer syntax
enctypeencoding types (undefined or explicit length)
wcachepointer to write cache object, may be NULL
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DcmOtherByteOtherWord.

virtual OFCondition DcmPixelItem::writeTagAndLength ( DcmOutputStream outStream,
const E_TransferSyntax  oxfer,
Uint32 &  writtenBytes 
) const [protected, virtual]

write tag, VR and length field to the given output stream

Parameters:
outStreamoutput stream
oxfertransfer syntax for writing
writtenBytesnumber of bytes written to stream returned in this parameter
Returns:
EC_Normal if successful, an error code otherwise

Reimplemented from DcmObject.

virtual OFCondition DcmPixelItem::writeXML ( STD_NAMESPACE ostream &  out,
const size_t  flags = 0 
) [virtual]

write object in XML format

Parameters:
outoutput stream to which the XML document is written
flagsoptional flag used to customize the output (see DCMTypes::XF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DcmOtherByteOtherWord.


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


Generated on Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027