Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
camitk::FrameOfReference Class Reference

FrameOfReference is only a label for an abstract coordinate system. More...

#include <FrameOfReference.h>

Public Member Functions

AnatomicalOrientationgetAnatomicalOrientation ()
 Get the anatomical information of the Frame (non-const version).
const AnatomicalOrientationgetAnatomicalOrientation () const
 Get the anatomical information of the Frame.
QString getAnatomicalOrientationLabel (int axis, bool minDirection) const
 Get the Anatomical orientation label of the corresponding axis/direction (or empty string if there is no label).
const QColor & getColor ()
 Get the color for graphical representation of the FrameOfReference Set the color the first time this is called to avoid "loosing" colors in the palette.
QString getDescription () const
 Get the description of the FrameOfReference.
int getIndex ()
 Get the index (a non-unique ID useful for user interaction) indexes start at 1.
QString getName () const
 Get the FrameOfReference name.
int getNumberOfDimensions () const
 Get the number of dimensions of this FrameOfReference.
UnitUnit getUnit (int dimension)
 get the unit of the given dimension if dimension is valid otherwise returns an invalid Unit
bool operator!= (const FrameOfReference &b) const
 Difference operator.
bool operator== (const FrameOfReference &b) const
 Equality operator.
void setAnatomicalOrientation (const AnatomicalOrientation &anatomicalOrientation)
 Set anatomical orientation information.
void setAnatomicalOrientation (QString threeLetterCode)
 Set anatomical orientation information.
void setColor (const QColor &color)
 Set a color for graphical representation of the FrameOfReference.
void setDescription (QString desc)
 Set the description of the FrameOfReference.
void setName (QString name)
 Set the name of the FrameOfReference Should be a short string, use setDescription if you want to store a more detailed description of the FrameOfReference.
void setNumberOfDimensions (int numberOfDimensions)
 Set the number of dimensions of this FrameOfReference.
void setUnit (int dimension, UnitUnit u)
 Set the unit of one dimension.
Implementation of InterfacePersistence
QVariant toVariant () const override
 Convert the Frame to a QVariant for Persistence.
void fromVariant (const QVariant &variant) override
 Load the Frame content from a QVariant.
bool setUuid (QUuid newId) override
 Set the unique identifier only if it is not already set.
QUuid getUuid () const override
 Get the unique identifier of the Frame.
Public Member Functions inherited from camitk::InterfacePersistence
virtual ~InterfacePersistence ()=default

Detailed Description

FrameOfReference is only a label for an abstract coordinate system.

It is used as origins and destinations of transformations.

There is no information stored in a FrameOfReference except

  • an ID,
  • a name and description
  • a number of dimensions (between 1 and 5, default is 3) and units ("mm" for the first 3 dimensions)
  • a AnatomicalOrientation that can describe whether there is a known anatomical orientation associated to each axis (
    See also
    AnatomicalOrientation)
  • a color (used in the transformation graph visualisation)

All constructors are protected, use TransformationManager to create a new instance.

See also
Transformation, TransformationManager, AnatomicalOrientation

Member Function Documentation

◆ fromVariant()

void camitk::FrameOfReference::fromVariant ( const QVariant & variant)
overridevirtual

Load the Frame content from a QVariant.

Implements camitk::InterfacePersistence.

References fromVariant().

Referenced by fromVariant().

◆ getAnatomicalOrientation() [1/2]

AnatomicalOrientation & camitk::FrameOfReference::getAnatomicalOrientation ( )
inline

Get the anatomical information of the Frame (non-const version).

◆ getAnatomicalOrientation() [2/2]

const AnatomicalOrientation & camitk::FrameOfReference::getAnatomicalOrientation ( ) const
inline

Get the anatomical information of the Frame.

Referenced by camitk::InteractiveViewer::setCameraOrientation().

◆ getAnatomicalOrientationLabel()

QString camitk::FrameOfReference::getAnatomicalOrientationLabel ( int axis,
bool minDirection ) const
inline

Get the Anatomical orientation label of the corresponding axis/direction (or empty string if there is no label).

Parameters
axisThe axis index (0,1,2)
minDirectionif true, return the label of the minimum/negative direction, otherwise return the label of the maximum/position direction for the given axis

◆ getColor()

const QColor & camitk::FrameOfReference::getColor ( )

Get the color for graphical representation of the FrameOfReference Set the color the first time this is called to avoid "loosing" colors in the palette.

References getColor().

Referenced by getColor().

◆ getDescription()

QString camitk::FrameOfReference::getDescription ( ) const
inline

Get the description of the FrameOfReference.

Optional string, more detailed than the name

◆ getIndex()

int camitk::FrameOfReference::getIndex ( )

Get the index (a non-unique ID useful for user interaction) indexes start at 1.

References getIndex().

Referenced by getIndex().

◆ getName()

QString camitk::FrameOfReference::getName ( ) const
inline

Get the FrameOfReference name.

Referenced by camitk::toString().

◆ getNumberOfDimensions()

int camitk::FrameOfReference::getNumberOfDimensions ( ) const
inline

Get the number of dimensions of this FrameOfReference.

◆ getUnit()

UnitUnit camitk::FrameOfReference::getUnit ( int dimension)

get the unit of the given dimension if dimension is valid otherwise returns an invalid Unit

References getUnit().

Referenced by getUnit().

◆ getUuid()

QUuid camitk::FrameOfReference::getUuid ( ) const
inlineoverridevirtual

Get the unique identifier of the Frame.

Implements camitk::InterfacePersistence.

Referenced by operator!=(), operator==(), and camitk::Component::toVariant().

◆ operator!=()

bool camitk::FrameOfReference::operator!= ( const FrameOfReference & b) const
inline

Difference operator.

Returns
True if the Uiids are different, otherwise false

References getUuid().

◆ operator==()

bool camitk::FrameOfReference::operator== ( const FrameOfReference & b) const
inline

Equality operator.

Returns
If the Uiids are the same, return true, even if the anatomical orientation or description do not match, otherwise false

References getUuid().

◆ setAnatomicalOrientation() [1/2]

void camitk::FrameOfReference::setAnatomicalOrientation ( const AnatomicalOrientation & anatomicalOrientation)
inline

Set anatomical orientation information.

◆ setAnatomicalOrientation() [2/2]

void camitk::FrameOfReference::setAnatomicalOrientation ( QString threeLetterCode)
inline

Set anatomical orientation information.

Parameters
threeLetterCodeSet a standard 3-letter orientation code (e.g. "RAI" for X axis from Right to Left, Y axis from Anterior to Posterior, Z axis from Inferior to Superior)

References camitk::AnatomicalOrientation::setOrientation().

◆ setColor()

void camitk::FrameOfReference::setColor ( const QColor & color)

Set a color for graphical representation of the FrameOfReference.

References setColor().

Referenced by setColor().

◆ setDescription()

void camitk::FrameOfReference::setDescription ( QString desc)
inline

Set the description of the FrameOfReference.

Optional string, more detailed than the name

◆ setName()

void camitk::FrameOfReference::setName ( QString name)
inline

Set the name of the FrameOfReference Should be a short string, use setDescription if you want to store a more detailed description of the FrameOfReference.

◆ setNumberOfDimensions()

void camitk::FrameOfReference::setNumberOfDimensions ( int numberOfDimensions)

Set the number of dimensions of this FrameOfReference.

Usually, the first three dimensions are spatial coordinates, the 4th one is time, and other dimensions may be used to represent other data type within the same 5D volume

References setNumberOfDimensions().

Referenced by setNumberOfDimensions().

◆ setUnit()

void camitk::FrameOfReference::setUnit ( int dimension,
UnitUnit u )

Set the unit of one dimension.

Parameters
ushould be a string following the Unified Codes for Units of Measurement standard (https://ucum.org) also used by DICOM. Common values are "mm" for space, "s" for time

References setUnit().

Referenced by setUnit().

◆ setUuid()

bool camitk::FrameOfReference::setUuid ( QUuid newId)
overridevirtual

Set the unique identifier only if it is not already set.

Returns
True if the ID was changed, false if it was not (because it was already set)

Implements camitk::InterfacePersistence.

References setUuid().

Referenced by setUuid().

◆ toVariant()

QVariant camitk::FrameOfReference::toVariant ( ) const
overridevirtual

Convert the Frame to a QVariant for Persistence.

Implements camitk::InterfacePersistence.

References toVariant().

Referenced by toVariant().


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