DcmObject Class Reference

base class for all DICOM objects defined in 'dcmdata' More...

Inheritance diagram for DcmObject:

DcmElement DcmItem DcmAttributeTag DcmByteString DcmFloatingPointDouble DcmFloatingPointSingle DcmOtherByteOtherWord DcmSequenceOfItems DcmSignedLong DcmSignedShort DcmUnsignedLong DcmUnsignedShort DcmDataset DcmDirectoryRecord DcmMetaInfo List of all members.

Public Member Functions

 DcmObject (const DcmTag &tag, const Uint32 len=0)
 constructor.
 DcmObject (const DcmObject &obj)
 copy constructor
virtual ~DcmObject ()
 destructor
virtual DcmObjectclone () const =0
 clone method
DcmObjectoperator= (const DcmObject &obj)
 assignment operator
virtual DcmEVR ident () const =0
 get type identifier (abstract)
DcmEVR getVR () const
OFBool isaString () const
virtual OFBool isLeaf () const =0
virtual void print (ostream &out, const size_t flags=0, const int level=0, const char *pixelFileName=NULL, size_t *pixelCounter=NULL)=0
 print object to a stream
OFCondition error () const
E_TransferState transferState () const
virtual void transferInit (void)
virtual void transferEnd (void)
Uint16 getGTag () const
Uint16 getETag () const
const DcmTaggetTag () const
void setGTag (Uint16 gtag)
virtual OFCondition setVR (DcmEVR)
virtual unsigned long getVM ()=0
virtual Uint32 calcElementLength (const E_TransferSyntax xfer, const E_EncodingType enctype)=0
virtual Uint32 getLength (const E_TransferSyntax xfer=EXS_LittleEndianImplicit, const E_EncodingType enctype=EET_UndefinedLength)=0
virtual OFBool canWriteXfer (const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer)=0
virtual OFCondition read (DcmInputStream &inStream, const E_TransferSyntax ixfer, const E_GrpLenEncoding glenc=EGL_noChange, const Uint32 maxReadLength=DCM_MaxReadLength)=0
virtual OFCondition write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype=EET_UndefinedLength)=0
 write object to a stream (abstract)
virtual OFCondition writeXML (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=EET_UndefinedLength)=0
 special write method for creation of digital signatures (abstract)
virtual OFBool isSignable () const
 returns true if the current object may be included in a digital signature
virtual OFBool containsUnknownVR () const
 returns true if the object contains an element with Unknown VR at any nesting level
virtual OFCondition clear ()=0
virtual OFCondition verify (const OFBool autocorrect=OFFalse)=0
virtual DcmObjectnextInContainer (const DcmObject *obj)
virtual OFCondition nextObject (DcmStack &stack, const OFBool intoSub)
virtual OFCondition search (const DcmTagKey &xtag, DcmStack &resultStack, E_SearchMode mode=ESM_fromHere, OFBool searchIntoSub=OFTrue)
virtual OFCondition searchErrors (DcmStack &resultStack)
virtual OFCondition loadAllDataIntoMemory ()=0

Protected Member Functions

void printNestingLevel (ostream &out, const size_t flags, const int level)
 print line indentation, e.g.
void printInfoLineStart (ostream &out, const size_t flags, const int level, DcmTag *tag=NULL)
 print beginning of the info line.
void printInfoLineEnd (ostream &out, const size_t flags, const unsigned long printedLength=0xffffffff, DcmTag *tag=NULL)
 print end of the info line.
virtual void printInfoLine (ostream &out, const size_t flags, const int level=0, const char *info=NULL, DcmTag *tag=NULL)
 print given text with element information.
virtual OFCondition writeTagAndLength (DcmOutputStream &outStream, const E_TransferSyntax oxfer, Uint32 &writtenBytes) const
virtual Uint32 getTagAndLengthSize (const E_TransferSyntax oxfer) const
 return the number of bytes needed to serialize the tag, VR and length information of the current object using the given transfer syntax.

Static Protected Member Functions

static OFCondition writeTag (DcmOutputStream &outStream, const DcmTag &tag, const E_TransferSyntax oxfer)

Protected Attributes

DcmTag Tag
Uint32 Length
E_TransferState fTransferState
OFCondition errorFlag
Uint32 fTransferredBytes

Detailed Description

base class for all DICOM objects defined in 'dcmdata'

Definition at line 121 of file dcobject.h.


Constructor & Destructor Documentation

DcmObject::DcmObject const DcmTag tag,
const Uint32  len = 0
 

constructor.

Create new object from given tag and length.

Parameters:
tag DICOM tag for the new element
len value length for the new element

DcmObject::DcmObject const DcmObject obj  ) 
 

copy constructor

Parameters:
obj item to be copied


Member Function Documentation

virtual DcmObject* DcmObject::clone  )  const [pure virtual]
 

clone method

Returns:
deep copy of this object

Implemented in DcmByteString, DcmCharString, DcmDataset, DcmDirectoryRecord, DcmFileFormat, DcmItem, DcmMetaInfo, DcmOverlayData, DcmPixelData, DcmPixelSequence, DcmPixelItem, DcmSequenceOfItems, DcmApplicationEntity, DcmAgeString, DcmAttributeTag, DcmCodeString, DcmDate, DcmDecimalString, DcmDateTime, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmIntegerString, DcmLongString, DcmLongText, DcmOtherByteOtherWord, DcmOtherFloat, DcmPersonName, DcmPolymorphOBOW, DcmShortString, DcmSignedLong, DcmSignedShort, DcmShortText, DcmTime, DcmUniqueIdentifier, DcmUnsignedLong, DcmUnsignedLongOffset, DcmUnsignedShort, and DcmUnlimitedText.

virtual OFBool DcmObject::containsUnknownVR  )  const [virtual]
 

returns true if the object contains an element with Unknown VR at any nesting level

Returns:
true if the object contains an element with Unknown VR, false otherwise

Reimplemented in DcmItem, and DcmSequenceOfItems.

virtual Uint32 DcmObject::getTagAndLengthSize const E_TransferSyntax  oxfer  )  const [protected, virtual]
 

return the number of bytes needed to serialize the tag, VR and length information of the current object using the given transfer syntax.

Parameters:
oxfer The transfer syntax used for encoding
Returns:
number of bytes, may be 8 or 12 depending on VR and transfer syntax.

virtual DcmEVR DcmObject::ident  )  const [pure virtual]
 

get type identifier (abstract)

Returns:
type identifier of this class

Implemented in DcmByteString, DcmDataset, DcmFileFormat, DcmItem, DcmMetaInfo, DcmOverlayData, DcmPixelData, DcmPixelSequence, DcmPixelItem, DcmSequenceOfItems, DcmApplicationEntity, DcmAgeString, DcmAttributeTag, DcmCodeString, DcmDate, DcmDecimalString, DcmDateTime, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmIntegerString, DcmLongString, DcmLongText, DcmOtherByteOtherWord, DcmOtherFloat, DcmPersonName, DcmShortString, DcmSignedLong, DcmSignedShort, DcmShortText, DcmTime, DcmUniqueIdentifier, DcmUnsignedLong, DcmUnsignedLongOffset, and DcmUnsignedShort.

virtual OFBool DcmObject::isSignable  )  const [virtual]
 

returns true if the current object may be included in a digital signature

Returns:
true if signable, false otherwise

Reimplemented in DcmSequenceOfItems.

DcmObject& DcmObject::operator= const DcmObject obj  ) 
 

assignment operator

Parameters:
obj object to be assigned/copied
Returns:
reference to this object

virtual void DcmObject::print ostream &  out,
const size_t  flags = 0,
const int  level = 0,
const char *  pixelFileName = NULL,
size_t *  pixelCounter = NULL
[pure virtual]
 

print object to a stream

Parameters:
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

Implemented in DcmByteString, DcmDataset, DcmFileFormat, DcmItem, DcmMetaInfo, DcmAttributeTag, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmOtherByteOtherWord, DcmSignedLong, DcmSignedShort, DcmUniqueIdentifier, DcmUnsignedLong, and DcmUnsignedShort.

virtual void DcmObject::printInfoLine ostream &  out,
const size_t  flags,
const int  level = 0,
const char *  info = NULL,
DcmTag tag = NULL
[protected, virtual]
 

print given text with element information.

Calls printInfoLineStart() and printInfoLineEnd() to frame the 'info' text.

Parameters:
out output stream
flags used to customize the output (see DCMTypes::PF_xxx)
level current level of nested items. Used for indentation.
info text to be printed
tag optional tag used to print the data element information

void DcmObject::printInfoLineEnd ostream &  out,
const size_t  flags,
const unsigned long  printedLength = 0xffffffff,
DcmTag tag = NULL
[protected]
 

print end of the info line.

The default output is length, value multiplicity and tag name, though other visualizations are possible depending on the value of 'flags'.

Parameters:
out output stream
flags used to customize the output (see DCMTypes::PF_xxx)
printedLength number of characters printed after line start. Used for padding purposes.
tag optional tag used to print the data element information

void DcmObject::printInfoLineStart ostream &  out,
const size_t  flags,
const int  level,
DcmTag tag = NULL
[protected]
 

print beginning of the info line.

The default output is tag and value representation, though other visualizations are possible depending on the value of 'flags'.

Parameters:
out output stream
flags used to customize the output (see DCMTypes::PF_xxx)
level current level of nested items. Used for indentation.
tag optional tag used to print the data element information

void DcmObject::printNestingLevel ostream &  out,
const size_t  flags,
const int  level
[protected]
 

print line indentation, e.g.

a couple of spaces for each nesting level. Depending on the value of 'flags' other visualizations are also possible.

Parameters:
out output stream
flags used to customize the output (see DCMTypes::PF_xxx)
level current level of nested items. Used for indentation.

virtual OFCondition DcmObject::write DcmOutputStream outStream,
const E_TransferSyntax  oxfer,
const E_EncodingType  enctype = EET_UndefinedLength
[pure virtual]
 

write object to a stream (abstract)

Parameters:
outStream DICOM output stream
oxfer output transfer syntax
enctype encoding types (undefined or explicit length)
Returns:
status, EC_Normal if successful, an error code otherwise

Implemented in DcmByteString, DcmDataset, DcmElement, DcmFileFormat, DcmItem, DcmMetaInfo, DcmPixelData, and DcmOtherByteOtherWord.

virtual OFCondition DcmObject::writeSignatureFormat DcmOutputStream outStream,
const E_TransferSyntax  oxfer,
const E_EncodingType  enctype = EET_UndefinedLength
[pure virtual]
 

special write method for creation of digital signatures (abstract)

Parameters:
outStream DICOM output stream
oxfer output transfer syntax
enctype encoding types (undefined or explicit length)
Returns:
status, EC_Normal if successful, an error code otherwise

Implemented in DcmByteString, DcmDataset, DcmElement, DcmItem, DcmPixelData, DcmPixelSequence, DcmPixelItem, DcmSequenceOfItems, DcmOtherByteOtherWord, and DcmPolymorphOBOW.

virtual OFCondition DcmObject::writeXML ostream &  out,
const size_t  flags = 0
[virtual]
 

write object in XML format to a stream

Parameters:
out output stream to which the XML document is written
flags optional flag used to customize the output (see DCMTypes::XF_xxx)
Returns:
status, always returns EC_Illegal Call

Reimplemented in DcmDataset, DcmElement, DcmFileFormat, DcmItem, DcmMetaInfo, DcmPixelData, DcmPixelItem, DcmSequenceOfItems, and DcmOtherByteOtherWord.


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


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5