DCMTK  Version 3.6.2
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
DSRSpatialCoordinatesValue Class Reference

Class for spatial coordinate values. More...

+ Inheritance diagram for DSRSpatialCoordinatesValue:

Public Member Functions

 DSRSpatialCoordinatesValue ()
 default constructor
 
 DSRSpatialCoordinatesValue (const DSRTypes::E_GraphicType graphicType)
 constructor More...
 
 DSRSpatialCoordinatesValue (const DSRSpatialCoordinatesValue &coordinatesValue)
 copy constructor More...
 
virtual ~DSRSpatialCoordinatesValue ()
 destructor
 
DSRSpatialCoordinatesValueoperator= (const DSRSpatialCoordinatesValue &coordinatesValue)
 assignment operator More...
 
virtual void clear ()
 clear all internal variables. More...
 
virtual OFBool isValid () const
 check whether the current spatial coordinates value is valid. More...
 
virtual OFBool isShort (const size_t flags) const
 check whether the content is short. More...
 
virtual OFCondition print (STD_NAMESPACE ostream &stream, const size_t flags) const
 print spatial coordinates. More...
 
virtual OFCondition read (DcmItem &dataset, const size_t flags)
 read spatial coordinates value from dataset More...
 
virtual OFCondition write (DcmItem &dataset) const
 write spatial coordinates reference value to dataset More...
 
virtual OFCondition readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags)
 read spatial coordinates value from XML document More...
 
virtual OFCondition writeXML (STD_NAMESPACE ostream &stream, const size_t flags) const
 write spatial coordinates value in XML format More...
 
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 More...
 
OFCondition getValue (DSRSpatialCoordinatesValue &coordinatesValue) const
 get copy of spatial coordinates value More...
 
const DSRSpatialCoordinatesValuegetValue () const
 get reference to spatial coordinates value More...
 
DSRTypes::E_GraphicType getGraphicType () const
 get current graphic type. More...
 
DSRGraphicDataListgetGraphicDataList ()
 get reference to graphic data list. More...
 
const OFStringgetFiducialUID () const
 get fiducial UID. More...
 
OFCondition setValue (const DSRSpatialCoordinatesValue &coordinatesValue, const OFBool check=OFTrue)
 set spatial coordinates value. More...
 
OFCondition setGraphicType (const DSRTypes::E_GraphicType graphicType, const OFBool check=OFTrue)
 set current graphic type. More...
 
OFCondition setFiducialUID (const OFString &fiducialUID, const OFBool check=OFTrue)
 set current fiducial UID. More...
 

Protected Member Functions

DSRSpatialCoordinatesValuegetValuePtr ()
 get pointer to spatial coordinates value More...
 
OFCondition checkGraphicData (const DSRTypes::E_GraphicType graphicType, const DSRGraphicDataList &graphicDataList, const OFBool reportWarnings=OFFalse) const
 check the specified graphic type and data for validity. More...
 
OFCondition checkFiducialUID (const OFString &fiducialUID) const
 check the specified fiducial UID for validity More...
 

Private Attributes

DSRTypes::E_GraphicType GraphicType
 Graphic Type (associated DICOM VR=CS, type 1)
 
DSRGraphicDataList GraphicDataList
 Graphic Data (associated DICOM VR=FL, VM=2-n, type 1)
 
OFString FiducialUID
 Fiducial UID (VR=UI, VM=1, type 3)
 

Friends

class DSRContentItem
 

Detailed Description

Class for spatial coordinate values.

Constructor & Destructor Documentation

◆ DSRSpatialCoordinatesValue() [1/2]

DSRSpatialCoordinatesValue::DSRSpatialCoordinatesValue ( const DSRTypes::E_GraphicType  graphicType)

constructor

Parameters
graphicTypegraphic type specifying the geometry of the coordinates

◆ DSRSpatialCoordinatesValue() [2/2]

DSRSpatialCoordinatesValue::DSRSpatialCoordinatesValue ( const DSRSpatialCoordinatesValue coordinatesValue)

copy constructor

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

Member Function Documentation

◆ checkFiducialUID()

OFCondition DSRSpatialCoordinatesValue::checkFiducialUID ( const OFString fiducialUID) const
protected

check the specified fiducial UID for validity

Parameters
fiducialUIDfiducial UID to be checked
Returns
status, EC_Normal if fiducial UID is valid, an error code otherwise

◆ checkGraphicData()

OFCondition DSRSpatialCoordinatesValue::checkGraphicData ( const DSRTypes::E_GraphicType  graphicType,
const DSRGraphicDataList graphicDataList,
const OFBool  reportWarnings = OFFalse 
) const
protected

check the specified graphic type and data for validity.

If 'graphicType' is valid, the number of entries in the 'graphicDatalist' are checked. A POINT needs exactly 1 value pair (column,row), a MULTIPOINT at least 1?, a POLYLINE at least 1?, a CIRCLE exactly 2 and an ELLIPSE exactly 4.

Parameters
graphicTypegraphic type to be checked
graphicDataListlist of graphic data to be checked
reportWarningsif enabled, report a warning message on each deviation from an expected value to the logger
Returns
status, EC_Normal if graphic type and data are valid, an error code otherwise

◆ clear()

virtual void DSRSpatialCoordinatesValue::clear ( )
virtual

clear all internal variables.

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

Reimplemented in DSRSCoordTreeNode.

◆ getFiducialUID()

const OFString& DSRSpatialCoordinatesValue::getFiducialUID ( ) const
inline

get fiducial UID.

Optional - This is the globally unique identifier for this fiducial item. It can be used to associate these spatial coordinates with other content items.

Returns
fiducial UID (might be invalid or an empty string)

◆ getGraphicDataList()

DSRGraphicDataList& DSRSpatialCoordinatesValue::getGraphicDataList ( )
inline

get reference to graphic data list.

This list contains an ordered set of (columns,rows) pairs that denote positions in an image. The allowed number of pairs is depending on the graphic type.

Returns
reference to graphic data list

◆ getGraphicType()

DSRTypes::E_GraphicType DSRSpatialCoordinatesValue::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 DSRTypes::GT_invalid)

◆ getValue() [1/2]

OFCondition DSRSpatialCoordinatesValue::getValue ( DSRSpatialCoordinatesValue 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

◆ getValue() [2/2]

const DSRSpatialCoordinatesValue& DSRSpatialCoordinatesValue::getValue ( ) const
inline

get reference to spatial coordinates value

Returns
reference to spatial coordinates value

◆ getValuePtr()

DSRSpatialCoordinatesValue* DSRSpatialCoordinatesValue::getValuePtr ( )
inlineprotected

get pointer to spatial coordinates value

Returns
pointer to spatial coordinates value (never NULL)

◆ isShort()

virtual OFBool DSRSpatialCoordinatesValue::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 DSRSCoordTreeNode.

◆ isValid()

virtual OFBool DSRSpatialCoordinatesValue::isValid ( ) const
virtual

check whether the current spatial coordinates value is valid.

The value is valid if the graphic type is not DSRTypes::GT_invalid and the graphic data is valid. See checkGraphicData() method for details.

Returns
OFTrue if reference value is valid, OFFalse otherwise

Reimplemented in DSRSCoordTreeNode.

◆ operator=()

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

assignment operator

Parameters
coordinatesValuespatial coordinates value to be copied (not checked !)
Returns
reference to this spatial coordinates value after 'coordinatesValue' has been copied

◆ print()

virtual OFCondition DSRSpatialCoordinatesValue::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: (CIRCLE,0/0,255/255).

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 DSRSCoordTreeNode.

◆ read()

virtual OFCondition DSRSpatialCoordinatesValue::read ( DcmItem dataset,
const size_t  flags 
)
virtual

read spatial coordinates value from dataset

Parameters
datasetDICOM dataset from which the value should be read
flagsflag used to customize the reading process (see DSRTypes::RF_xxx)
Returns
status, EC_Normal if successful, an error code otherwise

◆ readXML()

virtual OFCondition DSRSpatialCoordinatesValue::readXML ( const DSRXMLDocument doc,
DSRXMLCursor  cursor,
const size_t  flags 
)
virtual

read spatial coordinates value from XML document

Parameters
docdocument containing the XML file content
cursorcursor pointing to the starting node
flagsflag used to customize the reading process (see DSRTypes::XF_xxx)
Returns
status, EC_Normal if successful, an error code otherwise

◆ renderHTML()

virtual OFCondition DSRSpatialCoordinatesValue::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

◆ setFiducialUID()

OFCondition DSRSpatialCoordinatesValue::setFiducialUID ( const OFString fiducialUID,
const OFBool  check = OFTrue 
)

set current fiducial UID.

Globally unique identifier that can be used to associate these spatial coordinates with other content items.

Parameters
fiducialUIDvalue to be set (VR=UI, optional)
checkif enabled, check value for validity before setting it. See checkFiducialUID() method for details.
Returns
status, EC_Normal if successful, an error code otherwise

◆ setGraphicType()

OFCondition DSRSpatialCoordinatesValue::setGraphicType ( const DSRTypes::E_GraphicType  graphicType,
const OFBool  check = OFTrue 
)

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 (DSRTypes::GT_invalid is not allowed)
checkdummy parameter (currently not used)
Returns
status, EC_Normal if successful, an error code otherwise

◆ setValue()

OFCondition DSRSpatialCoordinatesValue::setValue ( const DSRSpatialCoordinatesValue coordinatesValue,
const OFBool  check = OFTrue 
)

set spatial coordinates value.

Before setting the value, the graphic type and data are usually checked. If the value is invalid, the current value is not replaced and remains unchanged.

Parameters
coordinatesValuevalue to be set
checkif enabled, check values for validity before setting them. See checkXXX() methods for details. Empty values are only accepted for non-mandatory attributes.
Returns
status, EC_Normal if successful, an error code otherwise

◆ write()

virtual OFCondition DSRSpatialCoordinatesValue::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

◆ writeXML()

virtual OFCondition DSRSpatialCoordinatesValue::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 DSRSCoordTreeNode.


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


Generated on Mon Jul 17 2017 for DCMTK Version 3.6.2 by Doxygen 1.8.13