DVPSGraphicAnnotation Class Reference

an item of the graphic annotation sequence in a presentation state (internal use only). More...

List of all members.

Public Member Functions

 DVPSGraphicAnnotation ()
 default constructor
 DVPSGraphicAnnotation (const DVPSGraphicAnnotation &copy)
 copy constructor
DVPSGraphicAnnotationclone ()
 clone method.
virtual ~DVPSGraphicAnnotation ()
 destructor
OFCondition read (DcmItem &dset)
 reads a graphic annotation from a DICOM dataset.
OFCondition write (DcmItem &dset)
 writes the graphic annotation managed by this object to a DICOM dataset.
const char * getAnnotationLayer ()
 get annotation layer name.
void setAnnotationLayer (const char *aLayer)
 set annotation layer name of this annotation.
OFCondition addImageReference (const char *sopclassUID, const char *instanceUID, unsigned long frame, DVPSObjectApplicability applicability)
 add a new image reference.
OFBool isEmpty ()
 checks if this annotation layer is empty.
OFBool isApplicable (const char *instanceUID, unsigned long frame, DVPSObjectApplicability applicability=DVPSB_currentFrame)
 checks if this annotation layer is applicable to the given image and frame.
size_t getNumberOfTextObjects ()
 returns the number of text objects in this annotation.
size_t getNumberOfGraphicObjects ()
 returns the number of graphic objects in this annotation.
DVPSTextObjectgetTextObject (size_t idx)
 returns a pointer to the text object with the given index or NULL if it does not exist.
DVPSGraphicObjectgetGraphicObject (size_t idx)
 returns a pointer to the graphic object with the given index or NULL if it does not exist.
void addTextObject (DVPSTextObject *text)
 adds the given text object to the list of text objects managed by this object.
void addGraphicObject (DVPSGraphicObject *graphic)
 adds the given graphic object to the list of graphic objects managed by this object.
DVPSTextObjectremoveTextObject (size_t idx)
 returns a pointer to the text object with the given index (or NULL if it does not exist) and removes it from the list.
DVPSGraphicObjectremoveGraphicObject (size_t idx)
 returns a pointer to the graphic object with the given index (or NULL if it does not exist) and removes it from the list.
void setLog (OFConsole *stream, OFBool verbMode, OFBool dbgMode)
 sets a new log stream

Private Member Functions

DVPSGraphicAnnotationoperator= (const DVPSGraphicAnnotation &)
 private undefined assignment operator

Private Attributes

DVPSReferencedImage_PList referencedImageList
 ReferencedImageSequence, Type 1c.
DcmCodeString graphicAnnotationLayer
 VR=CS, VM=1, Type 1.
DVPSTextObject_PList textObjectList
 TextObjectSequence, Type 1c.
DVPSGraphicObject_PList graphicObjectList
 GraphicObjectSequence, Type 1c.
OFConsolelogstream
 output stream for error messages, never NULL
OFBool verboseMode
 flag indicating whether we're operating in verbose mode
OFBool debugMode
 flag indicating whether we're operating in debug mode


Detailed Description

an item of the graphic annotation sequence in a presentation state (internal use only).

This class manages the data structures comprising one item of the Graphic Annotation Sequence in a Presentation State object.

Definition at line 50 of file dvpsga.h.


Member Function Documentation

void DVPSGraphicAnnotation::addGraphicObject DVPSGraphicObject graphic  ) 
 

adds the given graphic object to the list of graphic objects managed by this object.

Parameters:
text graphic object to be inserted.

OFCondition DVPSGraphicAnnotation::addImageReference const char *  sopclassUID,
const char *  instanceUID,
unsigned long  frame,
DVPSObjectApplicability  applicability
 

add a new image reference.

Checks if the referenced SOP instance UID already exists in this sequence. If it exists, an error code is returned. Otherwise a new image reference is created and added to the ReferencedImageSequence.

Parameters:
sopclassUID the SOP class UID of the image reference to be added.
instanceUID the SOP instance UID of the image reference to be added.
frame the frame number of the image reference (current image) to be added.
applicability the applicability of the image reference (DVPSB_currentFrame or DVPSX_currentImage)
Returns:
EC_Normal if successful, an error code otherwise.

void DVPSGraphicAnnotation::addTextObject DVPSTextObject text  ) 
 

adds the given text object to the list of text objects managed by this object.

Parameters:
text text object to be inserted.

DVPSGraphicAnnotation* DVPSGraphicAnnotation::clone  )  [inline]
 

clone method.

Returns:
a pointer to a new DVPSGraphicAnnotation object containing a deep copy of this object.

Definition at line 63 of file dvpsga.h.

References DVPSGraphicAnnotation().

const char* DVPSGraphicAnnotation::getAnnotationLayer  ) 
 

get annotation layer name.

Returns:
a pointer to the annotation layer name

DVPSGraphicObject* DVPSGraphicAnnotation::getGraphicObject size_t  idx  ) 
 

returns a pointer to the graphic object with the given index or NULL if it does not exist.

Parameters:
idx index, must be < getNumberOfGraphicObjects()
Returns:
pointer to graphic object or NULL

size_t DVPSGraphicAnnotation::getNumberOfGraphicObjects  ) 
 

returns the number of graphic objects in this annotation.

Returns:
number of graphic objects

size_t DVPSGraphicAnnotation::getNumberOfTextObjects  ) 
 

returns the number of text objects in this annotation.

Returns:
number of text objects

DVPSTextObject* DVPSGraphicAnnotation::getTextObject size_t  idx  ) 
 

returns a pointer to the text object with the given index or NULL if it does not exist.

Parameters:
idx index, must be < getNumberOfTextObjects()
Returns:
pointer to text object or NULL

OFBool DVPSGraphicAnnotation::isApplicable const char *  instanceUID,
unsigned long  frame,
DVPSObjectApplicability  applicability = DVPSB_currentFrame
 

checks if this annotation layer is applicable to the given image and frame.

Parameters:
instanceUID SOP instance UID of the current image
frame number of the current frame
applicability the required (minimum) applicability of the reference. Default: annotation layer applies to the current frame of the current image.
Returns:
OFTrue if applicable.

OFBool DVPSGraphicAnnotation::isEmpty  ) 
 

checks if this annotation layer is empty.

An annotation layer is empty when it contains no text object and no graphic object.

Returns:
OFTrue if empty.

OFCondition DVPSGraphicAnnotation::read DcmItem dset  ) 
 

reads a graphic annotation from a DICOM dataset.

The DICOM elements of the Graphic Annotation item are copied from the dataset to this object. The completeness of the item (presence of all required elements, value multiplicity) is checked. If this method returns an error code, the object is in undefined state afterwards.

Parameters:
dset the item of the GraphicAnnotationSequence from which the data is to be read
Returns:
EC_Normal if successful, an error code otherwise.

DVPSGraphicObject* DVPSGraphicAnnotation::removeGraphicObject size_t  idx  ) 
 

returns a pointer to the graphic object with the given index (or NULL if it does not exist) and removes it from the list.

Parameters:
idx index, must be < getNumberOfGraphicObjects()
Returns:
pointer to graphic object or NULL

DVPSTextObject* DVPSGraphicAnnotation::removeTextObject size_t  idx  ) 
 

returns a pointer to the text object with the given index (or NULL if it does not exist) and removes it from the list.

Parameters:
idx index, must be < getNumberOfTextObjects()
Returns:
pointer to text object or NULL

void DVPSGraphicAnnotation::setAnnotationLayer const char *  aLayer  ) 
 

set annotation layer name of this annotation.

Parameters:
aLayer a pointer to the annotation layer name, which is copied into this object.

void DVPSGraphicAnnotation::setLog OFConsole stream,
OFBool  verbMode,
OFBool  dbgMode
 

sets a new log stream

Parameters:
stream new log stream, NULL for default logstream
verbMode verbose mode flag
dbgMode debug mode flag

OFCondition DVPSGraphicAnnotation::write DcmItem dset  ) 
 

writes the graphic annotation managed by this object to a DICOM dataset.

Copies of the DICOM element managed by this object are inserted into the DICOM dataset.

Parameters:
dset the the item of the GraphicAnnotationSequence to which the data is written
Returns:
EC_Normal if successful, an error code otherwise.


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