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

#include <AnatomicalOrientation.h>

Public Member Functions

 AnatomicalOrientation ()
 Default constructor.
 AnatomicalOrientation (QString minXLabel, QString maxXLabel, QString minYLabel, QString maxYLabel, QString minZLabel, QString maxZLabel)
 Constructor setting a custom label for each axis negative and positive directions.
 AnatomicalOrientation (QString threeLetterCode)
 Constructor from a 3-letter code (e.g.
QString get3LetterCode (bool plus=false) const
 Return the current 3 letter code or an empty string if it is unknown or custom.
std::pair< int, bool > getAxisFromName (QString name) const
QString getLabel (int axis, bool minDirection) const
 Returns the label of the corresponding axis/direction (or empty string if there is no label).
QString getMaxLabel (int axis) const
 Get the label of the positive/maximum direction of the specified axis.
QString getMinLabel (int axis) const
 Get the label of the negative/minimum direction of the specified axis.
bool isUnknown () const
 Check if anatomical information is unknown.
void setLabels (int axis, QString minLabel, QString maxLabel)
 Set both negative and positive direction labels for an axis.
void setMaxLabel (int axis, QString maxLabel)
 Set the label of the corresponding axis positive direction.
void setMinLabel (int axis, QString minLabel)
 Set the label of the corresponding axis negative direction.
void setOrientation (QString minXLabel, QString maxXLabel, QString minYLabel, QString maxYLabel, QString minZLabel, QString maxZLabel)
 Set a custom label for the negative and positive directions of all axes.
void setOrientation (QString threeLetterCode)
 Sets the orientation using the standard 3-letter code.
void setUnkown ()
 Reset anatomical information to unknown.
InterfacePersistence implementation
QVariant toVariant () const override
 Convert all data from the object to a QVariantMap.
void fromVariant (const QVariant &variant) override
 Load data from a QVariant to initialize the current object.
bool setUuid (QUuid newid) override
 SetUuid does nothing It does not store the uuid, but is needed to implement InterfacePersistence.
QUuid getUuid () const override
 Returns an invalid uuid because AnatomicalOrientation is part of a FrameOfReference which has its own uuid, but this method is needed to implement InterfacePersistence.
Public Member Functions inherited from camitk::InterfacePersistence
virtual ~InterfacePersistence ()=default

Static Public Member Functions

static QString invert3LetterCode (const QString &code)
 Returns the inverted 3-letter code (e.g.

Constructor & Destructor Documentation

◆ AnatomicalOrientation() [1/3]

camitk::AnatomicalOrientation::AnatomicalOrientation ( )
inline

Default constructor.

Anatomical orientation is unknown

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

References setUnkown().

◆ AnatomicalOrientation() [2/3]

camitk::AnatomicalOrientation::AnatomicalOrientation ( QString threeLetterCode)
inlineexplicit

Constructor from a 3-letter code (e.g.

"RAI")

References setOrientation().

◆ AnatomicalOrientation() [3/3]

camitk::AnatomicalOrientation::AnatomicalOrientation ( QString minXLabel,
QString maxXLabel,
QString minYLabel,
QString maxYLabel,
QString minZLabel,
QString maxZLabel )
inline

Constructor setting a custom label for each axis negative and positive directions.

References setOrientation().

Member Function Documentation

◆ fromVariant()

void camitk::AnatomicalOrientation::fromVariant ( const QVariant & variant)
inlineoverridevirtual

Load data from a QVariant to initialize the current object.

Implements camitk::InterfacePersistence.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

◆ get3LetterCode()

QString camitk::AnatomicalOrientation::get3LetterCode ( bool plus = false) const
inline

Return the current 3 letter code or an empty string if it is unknown or custom.

Parameters
plusif true, the "+" variant is returned instead
See also
setOrientation(QString threeLetterCode) for more detail
Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

References invert3LetterCode().

◆ getAxisFromName()

std::pair< int, bool > camitk::AnatomicalOrientation::getAxisFromName ( QString name) const
inline
Returns
a pair<axisIndex, directionIsMin> where
  • axisIndex is the axis index (0,1,2) that matches the given label name (-1 is returned if there is no match),
  • directionIsMin is true if the given label name matches the negative/minimum direction of axisIndex and false if it matches the positive/maximum direction

Example: getAxisFromName("R") -> (0, true) for RAI data, (0, false) for LAI, getAxisFromName("A") -> (1, true) for RAI data. getAxisFromName("Apex") -> (1, false) if "Apex" is the label of the positive/maximum direction for the y-axis

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

◆ getLabel()

QString camitk::AnatomicalOrientation::getLabel ( int axis,
bool minDirection ) const
inline

Returns the 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
Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

◆ getMaxLabel()

QString camitk::AnatomicalOrientation::getMaxLabel ( int axis) const
inline

Get the label of the positive/maximum direction of the specified axis.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

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

◆ getMinLabel()

QString camitk::AnatomicalOrientation::getMinLabel ( int axis) const
inline

Get the label of the negative/minimum direction of the specified axis.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

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

◆ getUuid()

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

Returns an invalid uuid because AnatomicalOrientation is part of a FrameOfReference which has its own uuid, but this method is needed to implement InterfacePersistence.

Implements camitk::InterfacePersistence.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

◆ invert3LetterCode()

QString camitk::AnatomicalOrientation::invert3LetterCode ( const QString & code)
inlinestatic

Returns the inverted 3-letter code (e.g.

RAI becomes LPS)

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

Referenced by get3LetterCode().

◆ isUnknown()

bool camitk::AnatomicalOrientation::isUnknown ( ) const
inline

◆ setLabels()

void camitk::AnatomicalOrientation::setLabels ( int axis,
QString minLabel,
QString maxLabel )
inline

Set both negative and positive direction labels for an axis.

Parameters
minLabelThe label towards the negative/minimum values in the chosen axis
maxLabelThe label towards the positive/maximum values in the chosen axis
Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

References setMaxLabel(), and setMinLabel().

◆ setMaxLabel()

void camitk::AnatomicalOrientation::setMaxLabel ( int axis,
QString maxLabel )
inline

Set the label of the corresponding axis positive direction.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

Referenced by setLabels().

◆ setMinLabel()

void camitk::AnatomicalOrientation::setMinLabel ( int axis,
QString minLabel )
inline

Set the label of the corresponding axis negative direction.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

Referenced by setLabels().

◆ setOrientation() [1/2]

void camitk::AnatomicalOrientation::setOrientation ( QString minXLabel,
QString maxXLabel,
QString minYLabel,
QString maxYLabel,
QString minZLabel,
QString maxZLabel )
inline

Set a custom label for the negative and positive directions of all axes.

◆ setOrientation() [2/2]

void camitk::AnatomicalOrientation::setOrientation ( QString threeLetterCode)
inline

◆ setUnkown()

void camitk::AnatomicalOrientation::setUnkown ( )
inline

◆ setUuid()

bool camitk::AnatomicalOrientation::setUuid ( QUuid newid)
inlineoverridevirtual

SetUuid does nothing It does not store the uuid, but is needed to implement InterfacePersistence.

Implements camitk::InterfacePersistence.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

◆ toVariant()

QVariant camitk::AnatomicalOrientation::toVariant ( ) const
inlineoverridevirtual

Convert all data from the object to a QVariantMap.

Implements camitk::InterfacePersistence.

Examples
/build/camitk-9Ht7pk/camitk-6.0.0/sdk/libraries/core/utils/AnatomicalOrientation.h.

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