AnatomicalOrientation describes the relationship between 3D axes of a FrameOfReference and medical image anatomical orientation labels. More...
#include <AnatomicalOrientation.h>
Inheritance diagram for camitk::AnatomicalOrientation:
Collaboration diagram for camitk::AnatomicalOrientation: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. | |
AnatomicalOrientation describes the relationship between 3D axes of a FrameOfReference and medical image anatomical orientation labels.
For most methods, each axis is referred to by its index:
For each axis, the two possible directions are
The label of the positive direction is called "maxLabel". The label of the negative direction is called "minLabel".
Three letter codes are supported, e.g. "RAI", "LAS", or its "+"" variant "LPS+". Supported letters are R (right), L (left), A (anterior), P (posterior), I (inferior) or F (foot), S (superior) or H (head). 3 letter code "RAI" means - axis 0 (X) goes from Right (negative direction) to left (positive direction) - axis 1 (Y) goes from Anterior to posterior - axis 2 (Z) goes from Inferior to superior. The "+" variant reverses this convention, so LPS+ is equivalent to RAI
Using custom labels is also supported (this is incompatible with three letter code convention). In this case you can set positive and/or negative direction labels for any axis. Custom labels should only be used for specialized context / specific organ anatomy description (e.g. heart imaging along apex/base axis), as the standard viewer can only deal with the standard axial/coronal/sagittal orientation. Using standard 3-letter orientation is recommended.
This replaces and extend ImageOrientationHelper.
|
inline |
Default constructor.
Anatomical orientation is unknown
References setUnkown().
Here is the call graph for this function:
|
inlineexplicit |
Constructor from a 3-letter code (e.g.
"RAI")
References setOrientation().
Here is the call graph for this function:
|
inline |
Constructor setting a custom label for each axis negative and positive directions.
References setOrientation().
Here is the call graph for this function:
|
inlineoverridevirtual |
Load data from a QVariant to initialize the current object.
Implements camitk::InterfacePersistence.
|
inline |
Return the current 3 letter code or an empty string if it is unknown or custom.
| plus | if true, the "+" variant is returned instead |
References invert3LetterCode().
Here is the call graph for this function:
|
inline |
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
|
inline |
Returns the label of the corresponding axis/direction (or empty string if there is no label)
| axis | The axis index (0,1,2) |
| minDirection | if true, return the label of the minimum/negative direction, otherwise return the label of the maximum/position direction for the given axis |
Referenced by camitk::FrameOfReference::getAnatomicalOrientationLabel().
Here is the caller graph for this function:
|
inline |
Get the label of the positive/maximum direction of the specified axis.
Referenced by camitk::InteractiveViewer::setCameraOrientation().
Here is the caller graph for this function:
|
inline |
Get the label of the negative/minimum direction of the specified axis.
Referenced by camitk::InteractiveViewer::setCameraOrientation().
Here is the caller graph for this function:
|
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.
|
inlinestatic |
Returns the inverted 3-letter code (e.g.
RAI becomes LPS)
Referenced by get3LetterCode().
Here is the caller graph for this function:
|
inline |
Check if anatomical information is unknown.
Referenced by camitk::InteractiveViewer::setCameraOrientation().
Here is the caller graph for this function:
|
inline |
Set both negative and positive direction labels for an axis.
| minLabel | The label towards the negative/minimum values in the chosen axis |
| maxLabel | The label towards the positive/maximum values in the chosen axis |
References setMaxLabel(), and setMinLabel().
Here is the call graph for this function:
|
inline |
Set the label of the corresponding axis positive direction.
Referenced by setLabels().
Here is the caller graph for this function:
|
inline |
Set the label of the corresponding axis negative direction.
Referenced by setLabels().
Here is the caller graph for this function:
|
inline |
Set a custom label for the negative and positive directions of all axes.
|
inline |
Sets the orientation using the standard 3-letter code.
Referenced by AnatomicalOrientation(), AnatomicalOrientation(), and camitk::FrameOfReference::setAnatomicalOrientation().
Here is the caller graph for this function:
|
inline |
Reset anatomical information to unknown.
Referenced by AnatomicalOrientation().
Here is the caller graph for this function:
|
inlineoverridevirtual |
SetUuid does nothing It does not store the uuid, but is needed to implement InterfacePersistence.
Implements camitk::InterfacePersistence.
|
inlineoverridevirtual |
Convert all data from the object to a QVariantMap.
Implements camitk::InterfacePersistence.