OFFIS DCMTK  Version 3.6.0
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
DSRSpatialCoordinates3DValue Class Reference

Class for spatial coordinate (3D) values. More...

Inheritance diagram for DSRSpatialCoordinates3DValue:
[legend]
Collaboration diagram for DSRSpatialCoordinates3DValue:
[legend]

Public Member Functions

 DSRSpatialCoordinates3DValue ()
 default contructor
 
 DSRSpatialCoordinates3DValue (const DSRTypes::E_GraphicType3D graphicType)
 constructor
 
 DSRSpatialCoordinates3DValue (const DSRSpatialCoordinates3DValue &coordinatesValue)
 copy constructor
 
virtual ~DSRSpatialCoordinates3DValue ()
 destructor
 
DSRSpatialCoordinates3DValueoperator= (const DSRSpatialCoordinates3DValue &coordinatesValue)
 assignment operator
 
virtual void clear ()
 clear all internal variables.
 
virtual OFBool isValid () const
 check whether the current spatial coordinates value is valid.
 
virtual OFBool isShort (const size_t flags) const
 check whether the content is short.
 
virtual OFCondition print (STD_NAMESPACE ostream &stream, const size_t flags) const
 print spatial coordinates.
 
virtual OFCondition read (DcmItem &dataset)
 read spatial coordinates value from dataset
 
virtual OFCondition write (DcmItem &dataset) const
 write spatial coordinates reference value to dataset
 
virtual OFCondition readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor)
 read spatial coordinates value from XML document
 
virtual OFCondition writeXML (STD_NAMESPACE ostream &stream, const size_t flags) const
 write spatial coordinates value in XML format
 
virtual OFCondition renderHTML (STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, size_t &annexNumber, const size_t flags) const
 render spatial coordinates value in HTML/XHTML format
 
const
DSRSpatialCoordinates3DValue
getValue () const
 get reference to spatial coordinates value
 
DSRTypes::E_GraphicType3D getGraphicType () const
 get current graphic type.
 
OFCondition setGraphicType (const DSRTypes::E_GraphicType3D graphicType)
 set current graphic type.
 
const OFStringgetFrameOfReferenceUID () const
 get referenced frame of reference UID
 
OFCondition setFrameOfReferenceUID (const OFString &frameOfReferenceUID)
 set current referenced frame of reference UID
 
OFCondition getValue (DSRSpatialCoordinates3DValue &coordinatesValue) const
 get copy of spatial coordinates value
 
OFCondition setValue (const DSRSpatialCoordinates3DValue &coordinatesValue)
 set spatial coordinates value.
 
DSRGraphicData3DListgetGraphicDataList ()
 get reference to graphic data list.
 

Protected Member Functions

DSRSpatialCoordinates3DValuegetValuePtr ()
 get pointer to spatial coordinates value
 
OFBool checkData (const DSRTypes::E_GraphicType3D graphicType, const DSRGraphicData3DList &graphicDataList, const OFString &frameOfReferenceUID) const
 check the graphic type, graphic data and frame of reference UID for validity.
 

Private Attributes

DSRTypes::E_GraphicType3D GraphicType
 graphic type (associated DICOM VR=CS, type 1)
 
DSRGraphicData3DList GraphicDataList
 graphic data (associated DICOM VR=FL, VM=2-n, type 1)
 
OFString FrameOfReferenceUID
 referenced frame of reference UID (associated DICOM VR=UI, VM=1, type 1)
 

Friends

class DSRContentItem
 

Detailed Description

Class for spatial coordinate (3D) values.

Definition at line 46 of file dsrsc3vl.h.

Constructor & Destructor Documentation

DSRSpatialCoordinates3DValue::DSRSpatialCoordinates3DValue ( const DSRTypes::E_GraphicType3D  graphicType)

constructor

Parameters
graphicTypegraphic type specifying the geometry of the coordinates
DSRSpatialCoordinates3DValue::DSRSpatialCoordinates3DValue ( const DSRSpatialCoordinates3DValue coordinatesValue)

copy constructor

Parameters
coordinatesValuespatial coordinates value to be copied (not checked !)

Member Function Documentation

OFBool DSRSpatialCoordinates3DValue::checkData ( const DSRTypes::E_GraphicType3D  graphicType,
const DSRGraphicData3DList graphicDataList,
const OFString frameOfReferenceUID 
) const
protected

check the graphic type, graphic data and frame of reference UID for validity.

If 'graphicType' is valid the number of entries in the 'graphicDatalist' are checked. A POINT needs exactly 1 value triplets (x,y,z), a MULTIPOINT at least 1?, a POLYLINE at least 1?, a POLYGON at least 1? where the first and last triplet are equal, an ELLIPSE exactly 4 and an ELLIPSOID exactly 6.

Parameters
graphicTypegraphic type to be checked
graphicDataListlist of graphic data to be checked
frameOfReferenceUIDreferenced frame of reference UID to be checked
Returns
OFTrue if graphic type and data are valid, OFFalse otherwise
virtual void DSRSpatialCoordinates3DValue::clear ( )
virtual

clear all internal variables.

Graphic type is set to GT3_invalid. Since an empty list of graphic data is invalid the spatial coordinates value becomes invalid afterwards.

Reimplemented in DSRSCoord3DTreeNode.

const OFString& DSRSpatialCoordinates3DValue::getFrameOfReferenceUID ( ) const
inline

get referenced frame of reference UID

Returns
referenced frame of reference UID (might be empty)

Definition at line 178 of file dsrsc3vl.h.

References FrameOfReferenceUID.

DSRGraphicData3DList& DSRSpatialCoordinates3DValue::getGraphicDataList ( )
inline

get reference to graphic data list.

This list contains an ordered set of (x,y,z) triplets that denote positions in an image. The allowed number of triplets is depending on the graphic type.

Returns
reference to graphic data list

Definition at line 209 of file dsrsc3vl.h.

References GraphicDataList.

DSRTypes::E_GraphicType3D DSRSpatialCoordinates3DValue::getGraphicType ( ) const
inline

get current graphic type.

The graphic type specifies the geometry of the coordinates stored in the graphic data list.

Returns
graphic type (might be GT3_invalid)

Definition at line 162 of file dsrsc3vl.h.

References GraphicType.

const DSRSpatialCoordinates3DValue& DSRSpatialCoordinates3DValue::getValue ( ) const
inline

get reference to spatial coordinates value

Returns
reference to spatial coordinates value

Definition at line 152 of file dsrsc3vl.h.

OFCondition DSRSpatialCoordinates3DValue::getValue ( DSRSpatialCoordinates3DValue coordinatesValue) const

get copy of spatial coordinates value

Parameters
coordinatesValuereference to variable in which the value should be stored
Returns
status, EC_Normal if successful, an error code otherwise
DSRSpatialCoordinates3DValue* DSRSpatialCoordinates3DValue::getValuePtr ( )
inlineprotected

get pointer to spatial coordinates value

Returns
pointer to spatial coordinates value (never NULL)

Definition at line 220 of file dsrsc3vl.h.

virtual OFBool DSRSpatialCoordinates3DValue::isShort ( const size_t  flags) const
virtual

check whether the content is short.

This method is used to check whether the rendered output of this content item can be expanded inline or not (used for renderHTML()).

Parameters
flagsflag used to customize the output (see DSRTypes::HF_xxx)
Returns
OFTrue if the content is short, OFFalse otherwise

Reimplemented in DSRSCoord3DTreeNode.

virtual OFBool DSRSpatialCoordinates3DValue::isValid ( ) const
virtual

check whether the current spatial coordinates value is valid.

The value is valid if the graphic type is not GT3_invalid and the graphic data is valid (see checkData() for details).

Returns
OFTrue if reference value is valid, OFFalse otherwise

Reimplemented in DSRSCoord3DTreeNode.

DSRSpatialCoordinates3DValue& DSRSpatialCoordinates3DValue::operator= ( const DSRSpatialCoordinates3DValue coordinatesValue)

assignment operator

Parameters
coordinatesValuespatial coordinates value to be copied (not checked !)
Returns
reference to this spatial coordinates value after 'coordinatesValue' has been copied
virtual OFCondition DSRSpatialCoordinates3DValue::print ( STD_NAMESPACE ostream &  stream,
const size_t  flags 
) const
virtual

print spatial coordinates.

The output of a typical spatial coordinates value looks like this: (POINT,,100/100/100).

Parameters
streamoutput stream to which the spatial coordinates value should be printed
flagsflag used to customize the output (see DSRTypes::PF_xxx)
Returns
status, EC_Normal if successful, an error code otherwise

Reimplemented in DSRSCoord3DTreeNode.

virtual OFCondition DSRSpatialCoordinates3DValue::read ( DcmItem dataset)
virtual

read spatial coordinates value from dataset

Parameters
datasetDICOM dataset from which the value should be read
Returns
status, EC_Normal if successful, an error code otherwise
virtual OFCondition DSRSpatialCoordinates3DValue::readXML ( const DSRXMLDocument doc,
DSRXMLCursor  cursor 
)
virtual

read spatial coordinates value from XML document

Parameters
docdocument containing the XML file content
cursorcursor pointing to the starting node
Returns
status, EC_Normal if successful, an error code otherwise
virtual OFCondition DSRSpatialCoordinates3DValue::renderHTML ( STD_NAMESPACE ostream &  docStream,
STD_NAMESPACE ostream &  annexStream,
size_t &  annexNumber,
const size_t  flags 
) const
virtual

render spatial coordinates value in HTML/XHTML format

Parameters
docStreamoutput stream to which the main HTML/XHTML document is written
annexStreamoutput stream to which the HTML/XHTML document annex is written
annexNumberreference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added.
flagsflag used to customize the output (see DSRTypes::HF_xxx)
Returns
status, EC_Normal if successful, an error code otherwise
OFCondition DSRSpatialCoordinates3DValue::setFrameOfReferenceUID ( const OFString frameOfReferenceUID)

set current referenced frame of reference UID

Parameters
frameOfReferenceUIDreferenced frame of reference UID to be set
Returns
status, EC_Normal if successful, an error code otherwise
OFCondition DSRSpatialCoordinates3DValue::setGraphicType ( const DSRTypes::E_GraphicType3D  graphicType)

set current graphic type.

The graphic type specifies the geometry of the coordinates stored in the graphic data list.

Parameters
graphicTypegraphic type to be set (GT3_invalid is not allowed)
Returns
status, EC_Normal if successful, an error code otherwise
OFCondition DSRSpatialCoordinates3DValue::setValue ( const DSRSpatialCoordinates3DValue coordinatesValue)

set spatial coordinates value.

Before setting the value the graphic type, graphic data and frame of reference UID are checked (see checkData()). If the value is invalid the current value is not replaced and remains unchanged.

Parameters
coordinatesValuevalue to be set
Returns
status, EC_Normal if successful, an error code otherwise
virtual OFCondition DSRSpatialCoordinates3DValue::write ( DcmItem dataset) const
virtual

write spatial coordinates reference value to dataset

Parameters
datasetDICOM dataset to which the value should be written
Returns
status, EC_Normal if successful, an error code otherwise
virtual OFCondition DSRSpatialCoordinates3DValue::writeXML ( STD_NAMESPACE ostream &  stream,
const size_t  flags 
) const
virtual

write spatial coordinates value in XML format

Parameters
streamoutput stream to which the XML document is written
flagsflag used to customize the output (see DSRTypes::XF_xxx)
Returns
status, EC_Normal if successful, an error code otherwise

Reimplemented in DSRSCoord3DTreeNode.


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


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2