ITK
6.0.0
Insight Toolkit
|
#include <itkAnatomicalOrientation.h>
Representations of anatomical orientations and methods to convert between conventions.
Defines patient specific anatomical names to the XYZ axes of a 3D image.
A class instances holds the patient orientation stored as an enumerated type. Conversion to different representations such as strings and direction cosine matrices are supported.
The use of unambiguous anatomical orientation names such as "RightToLeft" is preferred, where "Right" is the "from direction" and the negative direction of the coordinates, while "Left" is the "to direction" and the positive direction. The following is an unambiguous construction of an AnatomicalOrientation object:
Definition at line 53 of file itkAnatomicalOrientation.h.
Public Member Functions | |
AnatomicalOrientation (const DirectionType &d) | |
constexpr | AnatomicalOrientation (CoordinateEnum primary, CoordinateEnum secondary, CoordinateEnum tertiary) |
constexpr | AnatomicalOrientation (NegativeEnum fromOrientation) |
constexpr | AnatomicalOrientation (PositiveEnum toOrientation) |
DirectionType | GetAsDirection () const |
NegativeEnum | GetAsNegativeOrientation () const |
std::string | GetAsNegativeStringEncoding () const |
PositiveEnum | GetAsPositiveOrientation () const |
std::string | GetAsPositiveStringEncoding () const |
CoordinateEnum | GetPrimaryTerm () const |
CoordinateEnum | GetSecondaryTerm () const |
std::array< CoordinateEnum, 3 > | GetTerms () const |
CoordinateEnum | GetTertiaryTerm () const |
operator PositiveEnum () const | |
Static Public Member Functions | |
static std::string | ConvertStringEncoding (std::string str) |
static AnatomicalOrientation | CreateFromNegativeStringEncoding (std::string str) |
static AnatomicalOrientation | CreateFromPositiveStringEncoding (std::string str) |
static constexpr bool | SameOrientationAxes (CoordinateEnum a, CoordinateEnum b) |
Static Public Attributes | |
static constexpr unsigned int | Dimension = 3 |
static constexpr unsigned int | ImageDimension = Dimension |
Protected Types | |
enum | CoordinateMajornessTermsEnum : uint8_t { CoordinateMajornessTermsEnum::PrimaryMinor = 0, CoordinateMajornessTermsEnum::SecondaryMinor = 8, CoordinateMajornessTermsEnum::TertiaryMinor = 16 } |
Protected Member Functions | |
CoordinateEnum | GetCoordinateTerm (CoordinateMajornessTermsEnum cmt) const |
Static Protected Member Functions | |
static PositiveEnum | ConvertDirectionToPositiveEnum (const DirectionType &dir) |
static DirectionType | ConvertPositiveEnumToDirection (PositiveEnum) |
static const std::map< PositiveEnum, std::string > & | GetCodeToString () |
static const std::map< std::string, PositiveEnum > & | GetStringToCode () |
Protected Attributes | |
PositiveEnum | m_Value |
Static Protected Attributes | |
template<CoordinateEnum VPrimary, CoordinateEnum VSecondary, CoordinateEnum VTertiary> | |
static constexpr uint32_t | m_OrientationValue |
Friends | |
ITKCommon_EXPORT std::ostream & | operator<< (std::ostream &out, PositiveEnum value) |
using itk::AnatomicalOrientation::DirectionType = typename ImageBase<Dimension>::DirectionType |
Definition at line 57 of file itkAnatomicalOrientation.h.
|
strong |
Enumerator | |
---|---|
UNKNOWN | |
RightToLeft | 0b0010 |
LeftToRight | |
PosteriorToAnterior | to front - 0b0100 |
AnteriorToPosterior | to back |
InferiorToSuperior | to head - 0b1000 |
SuperiorToInferior | to foot |
Definition at line 66 of file itkAnatomicalOrientation.h.
|
strongprotected |
Enumerator | |
---|---|
PrimaryMinor | |
SecondaryMinor | |
TertiaryMinor |
Definition at line 78 of file itkAnatomicalOrientation.h.
|
strong |
Definition at line 253 of file itkAnatomicalOrientation.h.
|
strong |
Definition at line 96 of file itkAnatomicalOrientation.h.
|
inlineconstexpr |
Initialize with CoordinateEnum's from separate axes.
If multiple CoordinateEnums are from the same axes then the Orientation value is INVALID.
Definition at line 415 of file itkAnatomicalOrientation.h.
|
inlineconstexpr |
Definition at line 427 of file itkAnatomicalOrientation.h.
|
inlineconstexpr |
Definition at line 432 of file itkAnatomicalOrientation.h.
|
inlineexplicit |
Conversion for a Direction Cosine Matrix to the closest anatomical orientation. Any partial axis rotations are rounded to the nearest axis, and lost in this conversion.
Definition at line 450 of file itkAnatomicalOrientation.h.
|
staticprotected |
Return the closest orientation for a direction cosine matrix.
|
staticprotected |
Return the direction cosine matrix for a orientation.
|
static |
An involution to convert between "positive" and "negative" single character encoding strings.
For example the string "RAS" is converted to "LPI" and vice versa.
The input maybe upper or lower case, while the output is always upper case. There is no check that the input is a valid encoding.
|
static |
|
static |
Creates a AnatomicalOrientation from a string with the PositiveEnum encoding. The string is case-insensitive. If the string is not a valid encoding then the orientation is set to INVALID.
|
inline |
Return the direction cosine matrix for the orientation.
Definition at line 487 of file itkAnatomicalOrientation.h.
|
inline |
Definition at line 499 of file itkAnatomicalOrientation.h.
std::string itk::AnatomicalOrientation::GetAsNegativeStringEncoding | ( | ) | const |
Returns the NegativeEnum encoding as a string. The string is always upper case.
|
inline |
Definition at line 493 of file itkAnatomicalOrientation.h.
std::string itk::AnatomicalOrientation::GetAsPositiveStringEncoding | ( | ) | const |
Returns the PositiveEnum encoding as a string. The string is always upper case.
|
staticprotected |
Return the global instance of the map from orientation enum to strings.
The implementation uses a function static local variable so the global is created only if needed, only once.
|
protected |
|
inline |
Definition at line 505 of file itkAnatomicalOrientation.h.
|
inline |
Definition at line 511 of file itkAnatomicalOrientation.h.
|
staticprotected |
Return the global instance of the map from string to orientation enum.
|
inline |
Definition at line 523 of file itkAnatomicalOrientation.h.
|
inline |
Definition at line 517 of file itkAnatomicalOrientation.h.
|
inline |
Definition at line 464 of file itkAnatomicalOrientation.h.
|
inlinestaticconstexpr |
Definition at line 529 of file itkAnatomicalOrientation.h.
|
friend |
Outputs the PositiveEnum encoding as a string such as "LPS".
|
staticconstexpr |
Definition at line 56 of file itkAnatomicalOrientation.h.
|
staticconstexpr |
Definition at line 58 of file itkAnatomicalOrientation.h.
|
staticconstexprprotected |
Definition at line 86 of file itkAnatomicalOrientation.h.
|
protected |
Definition at line 561 of file itkAnatomicalOrientation.h.