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.

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.


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 46 of file dvpsga.h.


Member Function Documentation

DVPSGraphicAnnotation* DVPSGraphicAnnotation::clone (  )  [inline]

clone method.

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

Definition at line 59 of file dvpsga.h.

References DVPSGraphicAnnotation().

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.

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.

const char* DVPSGraphicAnnotation::getAnnotationLayer (  ) 

get annotation layer name.

Returns:
a pointer to the annotation layer name

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.

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.

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.

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.

size_t DVPSGraphicAnnotation::getNumberOfTextObjects (  ) 

returns the number of text objects in this annotation.

Returns:
number of text objects

size_t DVPSGraphicAnnotation::getNumberOfGraphicObjects (  ) 

returns the number of graphic objects in this annotation.

Returns:
number of graphic 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

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

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.

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.

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

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


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


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1