DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
Class for spatial coordinate values. More...
Public Member Functions | |
DSRSpatialCoordinatesValue () | |
default contructor | |
DSRSpatialCoordinatesValue (const DSRTypes::E_GraphicType graphicType) | |
constructor | |
DSRSpatialCoordinatesValue (const DSRSpatialCoordinatesValue &coordinatesValue) | |
copy constructor | |
virtual | ~DSRSpatialCoordinatesValue () |
destructor | |
DSRSpatialCoordinatesValue & | operator= (const DSRSpatialCoordinatesValue &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 | |
OFCondition | getValue (DSRSpatialCoordinatesValue &coordinatesValue) const |
get copy of spatial coordinates value | |
const DSRSpatialCoordinatesValue & | getValue () const |
get reference to spatial coordinates value | |
DSRTypes::E_GraphicType | getGraphicType () const |
get current graphic type. | |
DSRGraphicDataList & | getGraphicDataList () |
get reference to graphic data list. | |
const OFString & | getFiducialUID () const |
get fiducial UID. | |
OFCondition | setValue (const DSRSpatialCoordinatesValue &coordinatesValue) |
set spatial coordinates value. | |
OFCondition | setGraphicType (const DSRTypes::E_GraphicType graphicType) |
set current graphic type. | |
OFCondition | setFiducialUID (const OFString &fiducialUID) |
set current fiducial UID. | |
Protected Member Functions | |
DSRSpatialCoordinatesValue * | getValuePtr () |
get pointer to spatial coordinates value | |
OFBool | checkData (const DSRTypes::E_GraphicType graphicType, const DSRGraphicDataList &graphicDataList) const |
check the graphic type and data for validity. | |
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 |
Class for spatial coordinate values.
DSRSpatialCoordinatesValue::DSRSpatialCoordinatesValue | ( | const DSRTypes::E_GraphicType | graphicType | ) |
constructor
graphicType | graphic type specifying the geometry of the coordinates |
DSRSpatialCoordinatesValue::DSRSpatialCoordinatesValue | ( | const DSRSpatialCoordinatesValue & | coordinatesValue | ) |
copy constructor
coordinatesValue | spatial coordinates value to be copied (not checked !) |
OFBool DSRSpatialCoordinatesValue::checkData | ( | const DSRTypes::E_GraphicType | graphicType, |
const DSRGraphicDataList & | graphicDataList | ||
) | const [protected] |
check the 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.
graphicType | graphic type to be checked |
graphicDataList | list of graphic data to be checked |
virtual void DSRSpatialCoordinatesValue::clear | ( | ) | [virtual] |
clear all internal variables.
Graphic type is set to GT_invalid. Since an empty list of graphic data is invalid the spatial coordinates value becomes invalid afterwards.
Reimplemented in DSRSCoordTreeNode.
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.
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.
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.
OFCondition DSRSpatialCoordinatesValue::getValue | ( | DSRSpatialCoordinatesValue & | coordinatesValue | ) | const |
get copy of spatial coordinates value
coordinatesValue | reference to variable in which the value should be stored |
const DSRSpatialCoordinatesValue& DSRSpatialCoordinatesValue::getValue | ( | ) | const [inline] |
get reference to spatial coordinates value
DSRSpatialCoordinatesValue* DSRSpatialCoordinatesValue::getValuePtr | ( | ) | [inline, protected] |
get pointer to spatial coordinates value
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()).
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
Reimplemented in DSRSCoordTreeNode.
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 GT_invalid and the graphic data is valid (see checkData() for details).
Reimplemented in DSRSCoordTreeNode.
DSRSpatialCoordinatesValue& DSRSpatialCoordinatesValue::operator= | ( | const DSRSpatialCoordinatesValue & | coordinatesValue | ) |
assignment operator
coordinatesValue | spatial coordinates value to be copied (not checked !) |
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).
stream | output stream to which the spatial coordinates value should be printed |
flags | flag used to customize the output (see DSRTypes::PF_xxx) |
Reimplemented in DSRSCoordTreeNode.
virtual OFCondition DSRSpatialCoordinatesValue::read | ( | DcmItem & | dataset | ) | [virtual] |
read spatial coordinates value from dataset
dataset | DICOM dataset from which the value should be read |
virtual OFCondition DSRSpatialCoordinatesValue::readXML | ( | const DSRXMLDocument & | doc, |
DSRXMLCursor | cursor | ||
) | [virtual] |
read spatial coordinates value from XML document
doc | document containing the XML file content |
cursor | cursor pointing to the starting node |
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
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) |
OFCondition DSRSpatialCoordinatesValue::setFiducialUID | ( | const OFString & | fiducialUID | ) |
set current fiducial UID.
Globally unique identifier that can be used to associate these spatial coordinates with other content items.
fiducialUID | value to be set (VR=UI, optional) |
OFCondition DSRSpatialCoordinatesValue::setGraphicType | ( | const DSRTypes::E_GraphicType | graphicType | ) |
set current graphic type.
The graphic type specifies the geometry of the coordinates stored in the graphic data list.
graphicType | graphic type to be set (GT_invalid is not allowed) |
OFCondition DSRSpatialCoordinatesValue::setValue | ( | const DSRSpatialCoordinatesValue & | coordinatesValue | ) |
set spatial coordinates value.
Before setting the value the graphic type and data are checked (see checkData()). If the value is invalid the current value is not replaced and remains unchanged.
coordinatesValue | value to be set |
virtual OFCondition DSRSpatialCoordinatesValue::write | ( | DcmItem & | dataset | ) | const [virtual] |
write spatial coordinates reference value to dataset
dataset | DICOM dataset to which the value should be written |
virtual OFCondition DSRSpatialCoordinatesValue::writeXML | ( | STD_NAMESPACE ostream & | stream, |
const size_t | flags | ||
) | const [virtual] |
write spatial coordinates value in XML format
stream | output stream to which the XML document is written |
flags | flag used to customize the output (see DSRTypes::XF_xxx) |
Reimplemented in DSRSCoordTreeNode.