DVPSTextObject Class Reference

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

List of all members.

Public Member Functions

 DVPSTextObject ()
 default constructor
 DVPSTextObject (const DVPSTextObject &copy)
 copy constructor
DVPSTextObjectclone ()
 clone method.
virtual ~DVPSTextObject ()
 destructor
OFCondition read (DcmItem &dset)
 reads a text object from a DICOM dataset.
OFCondition write (DcmItem &dset)
 writes the text object managed by this object to a DICOM dataset.
OFBool haveAnchorPoint ()
 checks if this text object contains an anchor point.
OFBool haveBoundingBox ()
 checks if this text object contains bounding box.
OFCondition setAnchorPoint (double x, double y, DVPSannotationUnit unit, OFBool isVisible)
 sets an anchor point for this text object.
OFCondition setBoundingBox (double TLHC_x, double TLHC_y, double BRHC_x, double BRHC_y, DVPSannotationUnit unit, DVPSTextJustification justification)
 sets bounding box for this text object.
OFCondition setText (const char *text)
 assigns a new "unformatted text value" for this text object.
void removeAnchorPoint ()
 removes any anchor point from the text object.
void removeBoundingBox ()
 removes any bounding box from the text object.
const char * getText ()
 gets the unformatted text value for this text object.
double getBoundingBoxTLHC_x ()
 gets the bounding box TLHC x value.
double getBoundingBoxTLHC_y ()
 gets the bounding box TLHC y value.
double getBoundingBoxBRHC_x ()
 gets the bounding box BRHC x value.
double getBoundingBoxBRHC_y ()
 gets the bounding box BRHC y value.
DVPSannotationUnit getBoundingBoxAnnotationUnits ()
 gets the bounding box annotation units.
DVPSTextJustification getBoundingBoxHorizontalJustification ()
 gets the bounding box horizontal justification.
double getAnchorPoint_x ()
 gets the anchor point x value.
double getAnchorPoint_y ()
 gets the anchor point y value.
OFBool anchorPointIsVisible ()
 gets the anchor point visibility May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)
DVPSannotationUnit getAnchorPointAnnotationUnits ()
 gets the anchor point annotation units.

Private Member Functions

DVPSTextObjectoperator= (const DVPSTextObject &)
 private undefined assignment operator

Private Attributes

DcmCodeString boundingBoxAnnotationUnits
 VR=CS, VM=1, Type 1c.
DcmCodeString anchorPointAnnotationUnits
 VR=CS, VM=1, Type 1c.
DcmShortText unformattedTextValue
 VR=ST, VM=1, Type 1.
DcmFloatingPointSingle boundingBoxTLHC
 VR=FL, VM=2, Type 1c.
DcmFloatingPointSingle boundingBoxBRHC
 VR=FL, VM=2, Type 1c.
DcmCodeString boundingBoxTextHorizontalJustification
 VR=CS, VM=1, Type 1c.
DcmFloatingPointSingle anchorPoint
 VR=FL, VM=2, Type 1c.
DcmCodeString anchorPointVisibility
 VR=CS, VM=1, Type 1c.


Detailed Description

an item of the text object sequence in a presentation state (internal use only).

This class manages the data structures comprising one item of the Text Object Sequence which is contained in the Graphic Annotation Sequence in a Presentation State object.

Definition at line 43 of file dvpstx.h.


Member Function Documentation

DVPSTextObject* DVPSTextObject::clone (  )  [inline]

clone method.

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

Definition at line 56 of file dvpstx.h.

References DVPSTextObject().

OFCondition DVPSTextObject::read ( DcmItem dset  ) 

reads a text object from a DICOM dataset.

The DICOM elements of the Text Object 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 TextObjectSequence from which the data is to be read
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSTextObject::write ( DcmItem dset  ) 

writes the text object 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 TextObjectSequence to which the data is written
Returns:
EC_Normal if successful, an error code otherwise.

OFBool DVPSTextObject::haveAnchorPoint (  ) 

checks if this text object contains an anchor point.

Returns:
OFTrue if anchor point present

OFBool DVPSTextObject::haveBoundingBox (  ) 

checks if this text object contains bounding box.

Returns:
OFTrue if bounding box present

OFCondition DVPSTextObject::setAnchorPoint ( double  x,
double  y,
DVPSannotationUnit  unit,
OFBool  isVisible 
)

sets an anchor point for this text object.

Parameters:
x anchor point X value
y anchor point Y value
unit anchor point annotation units (pixel/display)
isVisible anchor point visibility
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSTextObject::setBoundingBox ( double  TLHC_x,
double  TLHC_y,
double  BRHC_x,
double  BRHC_y,
DVPSannotationUnit  unit,
DVPSTextJustification  justification 
)

sets bounding box for this text object.

Parameters:
TLHC_x bounding box top-lefthand corner X value
TLHC_x bounding box top-lefthand corner Y value
BRHC_x bounding box bottom-righthand corner X value
BRHC_x bounding box bottom-righthand corner Y value
unit bounding box annotation units (pixel/display)
justification bounding box horizontal justification (left/right/center)
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSTextObject::setText ( const char *  text  ) 

assigns a new "unformatted text value" for this text object.

Parameters:
text unformatted text value. Must not be NULL or empty string.
Returns:
EC_Normal if successful, an error code otherwise.

void DVPSTextObject::removeAnchorPoint (  ) 

removes any anchor point from the text object.

Attention: A text object must always contain either anchor point, bounding box or both. This property is not asserted by the text object itself.

void DVPSTextObject::removeBoundingBox (  ) 

removes any bounding box from the text object.

Attention: A text object must always contain either anchor point, bounding box or both. This property is not asserted by the text object itself.

const char* DVPSTextObject::getText (  ) 

gets the unformatted text value for this text object.

Returns:
unformatted text value

double DVPSTextObject::getBoundingBoxTLHC_x (  ) 

gets the bounding box TLHC x value.

May only be called when a bounding box is present (haveBoundingBox()==OFTrue)

Returns:
bounding box TLHC x value

double DVPSTextObject::getBoundingBoxTLHC_y (  ) 

gets the bounding box TLHC y value.

May only be called when a bounding box is present (haveBoundingBox()==OFTrue)

Returns:
bounding box TLHC y value

double DVPSTextObject::getBoundingBoxBRHC_x (  ) 

gets the bounding box BRHC x value.

May only be called when a bounding box is present (haveBoundingBox()==OFTrue)

Returns:
bounding box BRHC x value

double DVPSTextObject::getBoundingBoxBRHC_y (  ) 

gets the bounding box BRHC y value.

May only be called when a bounding box is present (haveBoundingBox()==OFTrue)

Returns:
bounding box BRHC y value

DVPSannotationUnit DVPSTextObject::getBoundingBoxAnnotationUnits (  ) 

gets the bounding box annotation units.

May only be called when a bounding box is present (haveBoundingBox()==OFTrue)

Returns:
bounding box annotation units

DVPSTextJustification DVPSTextObject::getBoundingBoxHorizontalJustification (  ) 

gets the bounding box horizontal justification.

May only be called when a bounding box is present (haveBoundingBox()==OFTrue)

Returns:
bounding box horizontal justification

double DVPSTextObject::getAnchorPoint_x (  ) 

gets the anchor point x value.

May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)

Returns:
anchor point x value

double DVPSTextObject::getAnchorPoint_y (  ) 

gets the anchor point y value.

May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)

Returns:
anchor point y value

OFBool DVPSTextObject::anchorPointIsVisible (  ) 

gets the anchor point visibility May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)

Returns:
OFTrue if anchor point is visible

DVPSannotationUnit DVPSTextObject::getAnchorPointAnnotationUnits (  ) 

gets the anchor point annotation units.

May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)

Returns:
anchor point annotation units


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