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>

+ Inheritance diagram for camitk::FrameOfReference:
+ Collaboration diagram for camitk::FrameOfReference:

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.
 
Unit 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, Unit 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 description.

◆ 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().

+ Here is the caller graph for this function:

◆ 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

References camitk::AnatomicalOrientation::getLabel().

+ Here is the call graph for this function:

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

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

◆ getName()

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

Get the FrameOfReference name.

Referenced by camitk::toString().

+ Here is the caller graph for this function:

◆ getNumberOfDimensions()

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

Get the number of dimensions of this FrameOfReference.

◆ getUnit()

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

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

◆ getUuid()

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

Get the unique identifier of the Frame.

Implements camitk::InterfacePersistence.

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

+ Here is the caller graph for this function:

◆ operator!=()

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

Difference operator.

Returns
True if the Uiids are different, otherwise false

References getUuid().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:

◆ setColor()

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

Set a color for graphical representation of the FrameOfReference.

◆ 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

◆ setUnit()

void camitk::FrameOfReference::setUnit ( int  dimension,
Unit  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

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

◆ toVariant()

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

Convert the Frame to a QVariant for Persistence.

Implements camitk::InterfacePersistence.

References description.


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