DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes
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.


Member Function Documentation

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

Returns:
OFTrue if anchor point is visible

clone method.

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

gets the anchor point x value.

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

Returns:
anchor point x value

gets the anchor point y value.

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

Returns:
anchor point y value

gets the anchor point annotation units.

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

Returns:
anchor point annotation units

gets the bounding box annotation units.

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

Returns:
bounding box annotation units

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

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

gets the bounding box horizontal justification.

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

Returns:
bounding box horizontal justification

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

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
const char* DVPSTextObject::getText ( )

gets the unformatted text value for this text object.

Returns:
unformatted text value

checks if this text object contains an anchor point.

Returns:
OFTrue if anchor point present

checks if this text object contains bounding box.

Returns:
OFTrue if bounding box present

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

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.

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.

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

sets an anchor point for this text object.

Parameters:
xanchor point X value
yanchor point Y value
unitanchor point annotation units (pixel/display)
isVisibleanchor 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_xbounding box top-lefthand corner X value
TLHC_xbounding box top-lefthand corner Y value
BRHC_xbounding box bottom-righthand corner X value
BRHC_xbounding box bottom-righthand corner Y value
unitbounding box annotation units (pixel/display)
justificationbounding 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:
textunformatted text value. Must not be NULL or empty string.
Returns:
EC_Normal if successful, an error code otherwise.

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:
dsetthe the item of the TextObjectSequence 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 Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027