DCMTK: DSRSpatialCoordinates3DValue Class Reference

DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
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:

## Public Member Functions
| DSRSpatialCoordinates3DValue ()
| default constructor
| DSRSpatialCoordinates3DValue (const DSRTypes::E_GraphicType3D graphicType)
| constructor
| DSRSpatialCoordinates3DValue (const DSRSpatialCoordinates3DValue &coordinatesValue)
| copy constructor
virtual | ~DSRSpatialCoordinates3DValue ()
| destructor
DSRSpatialCoordinates3DValue & | operator= (const DSRSpatialCoordinates3DValue &coordinatesValue)
| assignment operator
virtual void | clear ()
| clear all internal variables.
OFBool | isEqual (const DSRSpatialCoordinates3DValue &coordinatesValue) const
| check whether values are "equal"
OFBool | isNotEqual (const DSRSpatialCoordinates3DValue &coordinatesValue) const
| check whether values are "not equal"
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, const size_t flags)
| 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, const size_t flags)
| 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
OFCondition | getValue (DSRSpatialCoordinates3DValue &coordinatesValue) const
| get copy of spatial coordinates value
const DSRSpatialCoordinates3DValue & | getValue () const
| get reference to spatial coordinates value
DSRTypes::E_GraphicType3D | getGraphicType () const
| get current graphic type.
DSRGraphicData3DList & | getGraphicDataList ()
| get reference to graphic data list.
const OFString & | getFrameOfReferenceUID () const
| get referenced frame of reference UID.
const OFString & | getFiducialUID () const
| get fiducial UID.
OFCondition | setValue (const DSRSpatialCoordinates3DValue &coordinatesValue, const OFBool check=OFTrue)
| set spatial coordinates value.
OFCondition | setGraphicType (const DSRTypes::E_GraphicType3D graphicType, const OFBool check=OFTrue)
| set current graphic type.
OFCondition | setFrameOfReferenceUID (const OFString &frameOfReferenceUID, const OFBool check=OFTrue)
| set current referenced frame of reference UID.
OFCondition | setFiducialUID (const OFString &fiducialUID, const OFBool check=OFTrue)
| set current fiducial UID.

## Protected Member Functions
DSRSpatialCoordinates3DValue * | getValuePtr ()
| get pointer to spatial coordinates value
OFCondition | checkGraphicData (const DSRTypes::E_GraphicType3D graphicType, const DSRGraphicData3DList &graphicDataList, const OFBool reportWarnings=OFFalse) const
| check the specified graphic type and data for validity.
OFCondition | checkFrameOfReferenceUID (const OFString &frameOfReferenceUID) const
| check the specified frame of reference UID for validity
OFCondition | checkFiducialUID (const OFString &fiducialUID) const
| check the specified fiducial 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 (VR=UI, VM=1, type 1)
OFString | FiducialUID
| Fiducial UID (VR=UI, VM=1, type 3)

## Friends
class | DSRContentItem

## Detailed Description

Class for spatial coordinate (3D) values.

## Constructor & Destructor Documentation

## ◆ DSRSpatialCoordinates3DValue() [1/2]

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

constructor

Parameters

  graphicType | graphic type specifying the geometry of the coordinates

## ◆ DSRSpatialCoordinates3DValue() [2/2]

DSRSpatialCoordinates3DValue::DSRSpatialCoordinates3DValue | ( | const DSRSpatialCoordinates3DValue & | coordinatesValue | ) |

copy constructor

Parameters

  coordinatesValue | spatial coordinates value to be copied (not checked !)

References DSRSpatialCoordinates3DValue().

## Member Function Documentation

## ◆ checkFiducialUID()

OFCondition DSRSpatialCoordinates3DValue::checkFiducialUID | ( | const OFString & | fiducialUID | ) | const
| protected

check the specified fiducial UID for validity

Parameters

  fiducialUID | fiducial UID to be checked

Returns
  status, EC_Normal if fiducial UID is valid, an error code otherwise

## ◆ checkFrameOfReferenceUID()

OFCondition DSRSpatialCoordinates3DValue::checkFrameOfReferenceUID | ( | const OFString & | frameOfReferenceUID | ) | const
| protected

check the specified frame of reference UID for validity

Parameters

  frameOfReferenceUID | referenced frame of reference UID to be checked

Returns
  status, EC_Normal if frame of reference UID is valid, an error code otherwise

## ◆ checkGraphicData()

OFCondition DSRSpatialCoordinates3DValue::checkGraphicData | ( | const DSRTypes::E_GraphicType3D | graphicType,
|  | const DSRGraphicData3DList & | 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 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

  graphicType | graphic type to be checked
  graphicDataList | list of graphic data to be checked
  reportWarnings | if 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 DSRSpatialCoordinates3DValue::clear | ( |  | ) |
| virtual

clear all internal variables.

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

Reimplemented in DSRSCoord3DTreeNode.

## ◆ getFiducialUID()

const OFString & DSRSpatialCoordinates3DValue::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)

References FiducialUID.

## ◆ getFrameOfReferenceUID()

const OFString & DSRSpatialCoordinates3DValue::getFrameOfReferenceUID | ( |  | ) | const
| inline

get referenced frame of reference UID.

Uniquely identifies the frame of reference within which the coordinates are defined.

Returns
  referenced frame of reference UID (might be invalid or an empty string)

References FrameOfReferenceUID.

## ◆ getGraphicDataList()

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

References GraphicDataList.

## ◆ getGraphicType()

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 DSRTypes::GT3_invalid)

References GraphicType.

## ◆ getValue() [1/2]

const DSRSpatialCoordinates3DValue & DSRSpatialCoordinates3DValue::getValue | ( |  | ) | const
| inline

get reference to spatial coordinates value

Returns
  reference to spatial coordinates value

References DSRSpatialCoordinates3DValue().

## ◆ getValue() [2/2]

OFCondition DSRSpatialCoordinates3DValue::getValue | ( | DSRSpatialCoordinates3DValue & | coordinatesValue | ) | const

get copy of spatial coordinates value

Parameters

  coordinatesValue | reference to variable in which the value should be stored

Returns
  status, EC_Normal if successful, an error code otherwise

References DSRSpatialCoordinates3DValue().

## ◆ getValuePtr()

DSRSpatialCoordinates3DValue * DSRSpatialCoordinates3DValue::getValuePtr | ( |  | ) |
| inlineprotected

get pointer to spatial coordinates value

Returns
  pointer to spatial coordinates value (never NULL)

References DSRSpatialCoordinates3DValue().

## ◆ isEqual()

OFBool DSRSpatialCoordinates3DValue::isEqual | ( | const DSRSpatialCoordinates3DValue & | coordinatesValue | ) | const

check whether values are "equal"

Parameters

  coordinatesValue | spatial coordinates value that should be compared to the current one

Returns
  OFTrue if both spatial coordinates values are equal, OFFalse otherwise

References DSRSpatialCoordinates3DValue().

## ◆ isNotEqual()

OFBool DSRSpatialCoordinates3DValue::isNotEqual | ( | const DSRSpatialCoordinates3DValue & | coordinatesValue | ) | const

check whether values are "not equal"

Parameters

  coordinatesValue | spatial coordinates value that should be compared to the current one

Returns
  OFTrue if both spatial coordinates values are not equal, OFFalse otherwise

References DSRSpatialCoordinates3DValue().

## ◆ isShort()

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

  flags | flag used to customize the output (see DSRTypes::HF_xxx)

Returns
  OFTrue if the content is short, OFFalse otherwise

Reimplemented in DSRSCoord3DTreeNode.

## ◆ isValid()

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 DSRTypes::GT3_invalid and the graphic data as well as the referenced frame of reference UID are valid. See checkXXX() methods for details.

Returns
  OFTrue if reference value is valid, OFFalse otherwise

Reimplemented in DSRSCoord3DTreeNode.

## ◆ operator=()

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

assignment operator

Parameters

  coordinatesValue | spatial coordinates value to be copied (not checked !)

Returns
  reference to this spatial coordinates value after 'coordinatesValue' has been copied

References DSRSpatialCoordinates3DValue().

## ◆ print()

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

  stream | output stream to which the spatial coordinates value should be printed
  flags | flag used to customize the output (see DSRTypes::PF_xxx)

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented in DSRSCoord3DTreeNode.

## ◆ read()

virtual OFCondition DSRSpatialCoordinates3DValue::read | ( | DcmItem & | dataset,
|  | const size_t | flags )
| virtual

read spatial coordinates value from dataset

Parameters

  dataset | DICOM dataset from which the value should be read
  flags | flag used to customize the reading process (see DSRTypes::RF_xxx)

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ readXML()

virtual OFCondition DSRSpatialCoordinates3DValue::readXML | ( | const DSRXMLDocument & | doc,
|  | DSRXMLCursor | cursor,
|  | const size_t | flags )
| virtual

read spatial coordinates value from XML document

Parameters

  doc | document containing the XML file content
  cursor | cursor pointing to the starting node
  flags | flag used to customize the reading process (see DSRTypes::XF_xxx)

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ renderHTML()

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

  docStream | output stream to which the main HTML/XHTML document is written
  annexStream | output stream to which the HTML/XHTML document annex is written
  annexNumber | reference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added.
  flags | flag used to customize the output (see DSRTypes::HF_xxx)

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ setFiducialUID()

OFCondition DSRSpatialCoordinates3DValue::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

  fiducialUID | value to be set (VR=UI, optional)
  check | if enabled, check value for validity before setting it. See checkFiducialUID() method for details.

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ setFrameOfReferenceUID()

OFCondition DSRSpatialCoordinates3DValue::setFrameOfReferenceUID | ( | const OFString & | frameOfReferenceUID,
|  | const OFBool | check = OFTrue )

set current referenced frame of reference UID.

Uniquely identifies the frame of reference within which the coordinates are defined.

Parameters

  frameOfReferenceUID | value to be set (VR=UI, mandatory)
  check | if enabled, check value for validity before setting it. See checkFrameOfReferenceUID() method for details. An empty value is never accepted.

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ setGraphicType()

OFCondition DSRSpatialCoordinates3DValue::setGraphicType | ( | const DSRTypes::E_GraphicType3D | 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

  graphicType | graphic type to be set (DSRTypes::GT3_invalid is not allowed)
  check | dummy parameter (currently not used)

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ setValue()

OFCondition DSRSpatialCoordinates3DValue::setValue | ( | const DSRSpatialCoordinates3DValue & | coordinatesValue,
|  | const OFBool | check = OFTrue )

set spatial coordinates value.

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

Parameters

  coordinatesValue | value to be set
  check | if 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

References DSRSpatialCoordinates3DValue().

## ◆ write()

virtual OFCondition DSRSpatialCoordinates3DValue::write | ( | DcmItem & | dataset | ) | const
| virtual

write spatial coordinates reference value to dataset

Parameters

  dataset | DICOM dataset to which the value should be written

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ writeXML()

virtual OFCondition DSRSpatialCoordinates3DValue::writeXML | ( | STD_NAMESPACE ostream & | stream,
|  | const size_t | flags ) const
| virtual

write spatial coordinates value in XML format

Parameters

  stream | output stream to which the XML document is written
  flags | flag 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:

- dcmsr/include/dcmtk/dcmsr/dsrsc3vl.h

Generated on Wed Apr 30 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2