DVPSAnnotationContent_PList Class Reference

the list of Annotations contained in a stored print object. More...

List of all members.

Public Member Functions

 DVPSAnnotationContent_PList ()
 default constructor
 DVPSAnnotationContent_PList (const DVPSAnnotationContent_PList &copy)
 copy constructor
DVPSAnnotationContent_PListclone ()
 clone method.
virtual ~DVPSAnnotationContent_PList ()
 destructor
OFCondition read (DcmItem &dset)
 reads a list of annotations (AnnotationContentSequence) from a DICOM dataset.
OFCondition write (DcmItem &dset)
 writes the list of annotations managed by this object to a DICOM dataset.
void clear ()
 reset the object to initial state.
size_t size () const
 gets the number of annotations in this list.
OFCondition addAnnotationBox (const char *instanceuid, const char *text, Uint16 position)
 creates a new annotation object and sets the content of this annotation object.
OFCondition deleteAnnotation (size_t idx)
 deletes one of the registered annotations.
OFCondition deleteMultipleAnnotations (size_t number)
 deletes multiple of the registered annotations, starting with the first one.
OFCondition setAnnotationSOPInstanceUID (size_t idx, const char *value)
 sets the SOP instance UID for the given annotation.
const char * getSOPInstanceUID (size_t idx)
 gets the current SOP Instance UID for the given registered annotation.
OFCondition prepareBasicAnnotationBox (size_t idx, DcmItem &dset)
 writes the attributes managed by the referenced object that are part of a basic annotation box N-SET request into the DICOM dataset.
void clearAnnotationSOPInstanceUIDs ()
 removes all UIDs from the annotation boxes managed by this object
void setLog (OFConsole *stream, OFBool verbMode, OFBool dbgMode)
 sets a new log stream

Private Member Functions

DVPSAnnotationContent_PListoperator= (const DVPSAnnotationContent_PList &)
 private undefined assignment operator
DVPSAnnotationContentgetAnnotationBox (size_t idx)
 returns a pointer to the annotation with the given index or NULL if it does not exist.

Private Attributes

OFList< DVPSAnnotationContent * > list_
 the list maintained by this object
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

the list of Annotations contained in a stored print object.

This class manages the data structures comprising one complete Annotation Content Sequence in a Stored Print object.

Definition at line 49 of file dvpsabl.h.


Member Function Documentation

OFCondition DVPSAnnotationContent_PList::addAnnotationBox const char *  instanceuid,
const char *  text,
Uint16  position
 

creates a new annotation object and sets the content of this annotation object.

Parameters:
instanceuid SOP instance UID of this annotation
text annotation text string
position annotation box position
Returns:
EC_Normal if successful, an error code otherwise.

void DVPSAnnotationContent_PList::clear  ) 
 

reset the object to initial state.

After this call, the object is in the same state as after creation with the default constructor.

DVPSAnnotationContent_PList* DVPSAnnotationContent_PList::clone  )  [inline]
 

clone method.

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

Definition at line 63 of file dvpsabl.h.

References DVPSAnnotationContent_PList().

OFCondition DVPSAnnotationContent_PList::deleteAnnotation size_t  idx  ) 
 

deletes one of the registered annotations.

Parameters:
idx index, must be < size()
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSAnnotationContent_PList::deleteMultipleAnnotations size_t  number  ) 
 

deletes multiple of the registered annotations, starting with the first one.

Parameters:
number number of annotations to delete, must be <= size()
Returns:
EC_Normal if successful, an error code otherwise.

DVPSAnnotationContent* DVPSAnnotationContent_PList::getAnnotationBox size_t  idx  )  [private]
 

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

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

const char* DVPSAnnotationContent_PList::getSOPInstanceUID size_t  idx  ) 
 

gets the current SOP Instance UID for the given registered annotation.

Parameters:
idx index, must be < getNumberOfAnnotations()
Returns:
SOP Instance UID, may be NULL.

OFCondition DVPSAnnotationContent_PList::prepareBasicAnnotationBox size_t  idx,
DcmItem dset
 

writes the attributes managed by the referenced object that are part of a basic annotation box N-SET request into the DICOM dataset.

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

Parameters:
idx index, must be < getNumberOfAnnotations()
dset the dataset to which the data is written
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSAnnotationContent_PList::read DcmItem dset  ) 
 

reads a list of annotations (AnnotationContentSequence) from a DICOM dataset.

The DICOM elements of the annotations are copied from the dataset to this object. The completeness of all items (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 DICOM dataset from which the sequence is to be read
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSAnnotationContent_PList::setAnnotationSOPInstanceUID size_t  idx,
const char *  value
 

sets the SOP instance UID for the given annotation.

Parameters:
idx index, must be < getNumberOfAnnotations()
value new attribute value, must not be NULL.
Returns:
EC_Normal if successful, an error code otherwise.

void DVPSAnnotationContent_PList::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

size_t DVPSAnnotationContent_PList::size  )  const [inline]
 

gets the number of annotations in this list.

Returns:
the number of annotations.

Definition at line 95 of file dvpsabl.h.

References list_, and OFList< T >::size().

Referenced by DVPSStoredPrint::getNumberOfAnnotations().

OFCondition DVPSAnnotationContent_PList::write DcmItem dset  ) 
 

writes the list of annotations 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 DICOM dataset to which the AnnotationContentSequence 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