DCMTK
Version 3.6.5
OFFIS DICOM Toolkit
|
an item of the graphic annotation sequence in a presentation state (internal use only). More...
Public Member Functions | |
DVPSGraphicAnnotation () | |
default constructor | |
DVPSGraphicAnnotation (const DVPSGraphicAnnotation ©) | |
copy constructor | |
DVPSGraphicAnnotation * | clone () |
clone method. More... | |
virtual | ~DVPSGraphicAnnotation () |
destructor | |
OFCondition | read (DcmItem &dset) |
reads a graphic annotation from a DICOM dataset. More... | |
OFCondition | write (DcmItem &dset) |
writes the graphic annotation managed by this object to a DICOM dataset. More... | |
const char * | getAnnotationLayer () |
get annotation layer name. More... | |
void | setAnnotationLayer (const char *aLayer) |
set annotation layer name of this annotation. More... | |
OFCondition | addImageReference (const char *sopclassUID, const char *instanceUID, unsigned long frame, DVPSObjectApplicability applicability) |
add a new image reference. More... | |
OFBool | isEmpty () |
checks if this annotation layer is empty. More... | |
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. More... | |
size_t | getNumberOfTextObjects () |
returns the number of text objects in this annotation. More... | |
size_t | getNumberOfGraphicObjects () |
returns the number of graphic objects in this annotation. More... | |
DVPSTextObject * | getTextObject (size_t idx) |
returns a pointer to the text object with the given index or NULL if it does not exist. More... | |
DVPSGraphicObject * | getGraphicObject (size_t idx) |
returns a pointer to the graphic object with the given index or NULL if it does not exist. More... | |
void | addTextObject (DVPSTextObject *text) |
adds the given text object to the list of text objects managed by this object. More... | |
void | addGraphicObject (DVPSGraphicObject *graphic) |
adds the given graphic object to the list of graphic objects managed by this object. More... | |
DVPSTextObject * | 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. More... | |
DVPSGraphicObject * | 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. More... | |
Private Member Functions | |
DVPSGraphicAnnotation & | operator= (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. | |
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.
void DVPSGraphicAnnotation::addGraphicObject | ( | DVPSGraphicObject * | graphic | ) |
adds the given graphic object to the list of graphic objects managed by this object.
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.
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) |
void DVPSGraphicAnnotation::addTextObject | ( | DVPSTextObject * | text | ) |
adds the given text object to the list of text objects managed by this object.
text | text object to be inserted. |
|
inline |
clone method.
const char* DVPSGraphicAnnotation::getAnnotationLayer | ( | ) |
get 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.
idx | index, must be < getNumberOfGraphicObjects() |
size_t DVPSGraphicAnnotation::getNumberOfGraphicObjects | ( | ) |
returns the number of graphic objects in this annotation.
size_t DVPSGraphicAnnotation::getNumberOfTextObjects | ( | ) |
returns the number of text objects in this annotation.
DVPSTextObject* DVPSGraphicAnnotation::getTextObject | ( | size_t | idx | ) |
returns a pointer to the text object with the given index or NULL if it does not exist.
idx | index, must be < getNumberOfTextObjects() |
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.
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. |
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.
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.
dset | the item of the GraphicAnnotationSequence from which the data is to be read |
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.
idx | index, must be < getNumberOfGraphicObjects() |
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.
idx | index, must be < getNumberOfTextObjects() |
void DVPSGraphicAnnotation::setAnnotationLayer | ( | const char * | aLayer | ) |
set annotation layer name of this annotation.
aLayer | a pointer to the annotation layer name, which is copied into this object. |
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.
dset | the the item of the GraphicAnnotationSequence to which the data is written |