OFFIS DCMTK
Version 3.6.0
|
Class for spatial coordinate (3D) values. More...
Public Member Functions | |
DSRSpatialCoordinates3DValue () | |
default contructor | |
DSRSpatialCoordinates3DValue (const DSRTypes::E_GraphicType3D graphicType) | |
constructor More... | |
DSRSpatialCoordinates3DValue (const DSRSpatialCoordinates3DValue &coordinatesValue) | |
copy constructor More... | |
virtual | ~DSRSpatialCoordinates3DValue () |
destructor | |
DSRSpatialCoordinates3DValue & | operator= (const DSRSpatialCoordinates3DValue &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) |
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) |
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... | |
const DSRSpatialCoordinates3DValue & | getValue () const |
get reference to spatial coordinates value More... | |
DSRTypes::E_GraphicType3D | getGraphicType () const |
get current graphic type. More... | |
OFCondition | setGraphicType (const DSRTypes::E_GraphicType3D graphicType) |
set current graphic type. More... | |
const OFString & | getFrameOfReferenceUID () const |
get referenced frame of reference UID More... | |
OFCondition | setFrameOfReferenceUID (const OFString &frameOfReferenceUID) |
set current referenced frame of reference UID More... | |
OFCondition | getValue (DSRSpatialCoordinates3DValue &coordinatesValue) const |
get copy of spatial coordinates value More... | |
OFCondition | setValue (const DSRSpatialCoordinates3DValue &coordinatesValue) |
set spatial coordinates value. More... | |
DSRGraphicData3DList & | getGraphicDataList () |
get reference to graphic data list. More... | |
Protected Member Functions | |
DSRSpatialCoordinates3DValue * | getValuePtr () |
get pointer to spatial coordinates value More... | |
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. More... | |
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 |
Class for spatial coordinate (3D) values.
Definition at line 46 of file dsrsc3vl.h.
DSRSpatialCoordinates3DValue::DSRSpatialCoordinates3DValue | ( | const DSRTypes::E_GraphicType3D | graphicType | ) |
constructor
graphicType | graphic type specifying the geometry of the coordinates |
DSRSpatialCoordinates3DValue::DSRSpatialCoordinates3DValue | ( | const DSRSpatialCoordinates3DValue & | coordinatesValue | ) |
copy constructor
coordinatesValue | spatial coordinates value to be copied (not checked !) |
|
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.
graphicType | graphic type to be checked |
graphicDataList | list of graphic data to be checked |
frameOfReferenceUID | referenced frame of reference UID to be checked |
Referenced by getValuePtr().
|
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.
|
inline |
get referenced frame of reference UID
Definition at line 178 of file dsrsc3vl.h.
References FrameOfReferenceUID, getValue(), setFrameOfReferenceUID(), and setValue().
|
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.
Definition at line 209 of file dsrsc3vl.h.
References GraphicDataList.
|
inline |
get current graphic type.
The graphic type specifies the geometry of the coordinates stored in the graphic data list.
Definition at line 162 of file dsrsc3vl.h.
References GraphicType, and setGraphicType().
|
inline |
get reference to spatial coordinates value
Definition at line 152 of file dsrsc3vl.h.
Referenced by getFrameOfReferenceUID().
OFCondition DSRSpatialCoordinates3DValue::getValue | ( | DSRSpatialCoordinates3DValue & | coordinatesValue | ) | const |
get copy of spatial coordinates value
coordinatesValue | reference to variable in which the value should be stored |
|
inlineprotected |
get pointer to spatial coordinates value
Definition at line 220 of file dsrsc3vl.h.
References checkData().
|
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 DSRSCoord3DTreeNode.
|
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).
Reimplemented in DSRSCoord3DTreeNode.
DSRSpatialCoordinates3DValue& DSRSpatialCoordinates3DValue::operator= | ( | const DSRSpatialCoordinates3DValue & | coordinatesValue | ) |
assignment operator
coordinatesValue | spatial coordinates value to be copied (not checked !) |
|
virtual |
print spatial coordinates.
The output of a typical spatial coordinates value looks like this: (POINT,,100/100/100).
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 DSRSCoord3DTreeNode.
|
virtual |
read spatial coordinates value from dataset
dataset | DICOM dataset from which the value should be read |
|
virtual |
read spatial coordinates value from XML document
doc | document containing the XML file content |
cursor | cursor pointing to the starting node |
|
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 DSRSpatialCoordinates3DValue::setFrameOfReferenceUID | ( | const OFString & | frameOfReferenceUID | ) |
set current referenced frame of reference UID
frameOfReferenceUID | referenced frame of reference UID to be set |
Referenced by getFrameOfReferenceUID().
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.
graphicType | graphic type to be set (GT3_invalid is not allowed) |
Referenced by getGraphicType().
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.
coordinatesValue | value to be set |
Referenced by getFrameOfReferenceUID().
|
virtual |
write spatial coordinates reference value to dataset
dataset | DICOM dataset to which the value should be written |
|
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 DSRSCoord3DTreeNode.