diff --git a/Modules/Core/Common/include/itkAnatomicalOrientation.h b/Modules/Core/Common/include/itkAnatomicalOrientation.h index 316956b8cee..bb977d5382e 100644 --- a/Modules/Core/Common/include/itkAnatomicalOrientation.h +++ b/Modules/Core/Common/include/itkAnatomicalOrientation.h @@ -54,7 +54,7 @@ class ITKCommon_EXPORT AnatomicalOrientation enum class CoordinateEnum : uint8_t { UNKNOWN = 0, -#ifdef ITK_AMBIBUOUS_TO_COORDINATE_ENUMS +#ifdef ITK_AMBIGUOUS_TO_COORDINATE_ENUMS Left = 2, Right = 3, Anterior = 4, @@ -88,322 +88,317 @@ class ITKCommon_EXPORT AnatomicalOrientation GetCoordinateTerm(CoordinateMajornessTermsEnum cmt) const; public: -#define ITK_ORIENTATION_ENUM(P, S, T) m_OrientationValue - - enum class ToEnum : uint32_t { INVALID = 0, - RIP = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior), - LIP = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior), - RSP = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior), - LSP = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior), - RIA = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior), - LIA = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior), - RSA = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior), - LSA = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior), - - IRP = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior), - ILP = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior), - SRP = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior), - SLP = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior), - IRA = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior), - ILA = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior), - SRA = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior), - SLA = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior), - - RPI = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior), - LPI = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior), - RAI = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior), - LAI = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior), - RPS = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior), - LPS = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior), - RAS = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior), - LAS = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior), - - PRI = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior), - PLI = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior), - ARI = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior), - ALI = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior), - PRS = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior), - PLS = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior), - ARS = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior), - ALS = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior), - - IPR = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight), - SPR = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight), - IAR = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight), - SAR = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight), - IPL = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft), - SPL = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft), - IAL = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft), - SAL = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft), - - PIR = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight), - PSR = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight), - AIR = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight), - ASR = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight), - PIL = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft), - PSL = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft), - AIL = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft), - ASL = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft) + RIP = m_OrientationValue, + LIP = m_OrientationValue, + RSP = m_OrientationValue, + LSP = m_OrientationValue, + RIA = m_OrientationValue, + LIA = m_OrientationValue, + RSA = m_OrientationValue, + LSA = m_OrientationValue, + + IRP = m_OrientationValue, + ILP = m_OrientationValue, + SRP = m_OrientationValue, + SLP = m_OrientationValue, + IRA = m_OrientationValue, + ILA = m_OrientationValue, + SRA = m_OrientationValue, + SLA = m_OrientationValue, + + RPI = m_OrientationValue, + LPI = m_OrientationValue, + RAI = m_OrientationValue, + LAI = m_OrientationValue, + RPS = m_OrientationValue, + LPS = m_OrientationValue, + RAS = m_OrientationValue, + LAS = m_OrientationValue, + + PRI = m_OrientationValue, + PLI = m_OrientationValue, + ARI = m_OrientationValue, + ALI = m_OrientationValue, + PRS = m_OrientationValue, + PLS = m_OrientationValue, + ARS = m_OrientationValue, + ALS = m_OrientationValue, + + IPR = m_OrientationValue, + SPR = m_OrientationValue, + IAR = m_OrientationValue, + SAR = m_OrientationValue, + IPL = m_OrientationValue, + SPL = m_OrientationValue, + IAL = m_OrientationValue, + SAL = m_OrientationValue, + + PIR = m_OrientationValue, + PSR = m_OrientationValue, + AIR = m_OrientationValue, + ASR = m_OrientationValue, + PIL = m_OrientationValue, + PSL = m_OrientationValue, + AIL = m_OrientationValue, + ASL = m_OrientationValue }; enum class FromEnum : uint32_t { INVALID = 0, - RIP = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior), - LIP = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior), - RSP = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior), - LSP = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior), - RIA = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior), - LIA = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior), - RSA = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior), - LSA = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior), - - IRP = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior), - ILP = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior), - SRP = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior), - SLP = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior), - IRA = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior), - ILA = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior), - SRA = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior), - SLA = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior), - - RPI = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior), - LPI = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior), - RAI = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior), - LAI = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior), - RPS = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior), - LPS = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior), - RAS = ITK_ORIENTATION_ENUM(CoordinateEnum::RightToLeft, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior), - LAS = ITK_ORIENTATION_ENUM(CoordinateEnum::LeftToRight, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior), - - PRI = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior), - PLI = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior), - ARI = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::InferiorToSuperior), - ALI = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::InferiorToSuperior), - PRS = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior), - PLS = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior), - ARS = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft, - CoordinateEnum::SuperiorToInferior), - ALS = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight, - CoordinateEnum::SuperiorToInferior), - - IPR = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft), - SPR = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::RightToLeft), - IAR = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft), - SAR = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::RightToLeft), - IPL = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight), - SPL = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::LeftToRight), - IAL = ITK_ORIENTATION_ENUM(CoordinateEnum::InferiorToSuperior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight), - SAL = ITK_ORIENTATION_ENUM(CoordinateEnum::SuperiorToInferior, - CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::LeftToRight), - - PIR = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft), - PSR = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft), - AIR = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::RightToLeft), - ASR = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::RightToLeft), - PIL = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight), - PSL = ITK_ORIENTATION_ENUM(CoordinateEnum::PosteriorToAnterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight), - AIL = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::InferiorToSuperior, - CoordinateEnum::LeftToRight), - ASL = ITK_ORIENTATION_ENUM(CoordinateEnum::AnteriorToPosterior, - CoordinateEnum::SuperiorToInferior, - CoordinateEnum::LeftToRight) + RIP = m_OrientationValue, + LIP = m_OrientationValue, + RSP = m_OrientationValue, + LSP = m_OrientationValue, + RIA = m_OrientationValue, + LIA = m_OrientationValue, + RSA = m_OrientationValue, + LSA = m_OrientationValue, + + IRP = m_OrientationValue, + ILP = m_OrientationValue, + SRP = m_OrientationValue, + SLP = m_OrientationValue, + IRA = m_OrientationValue, + ILA = m_OrientationValue, + SRA = m_OrientationValue, + SLA = m_OrientationValue, + + RPI = m_OrientationValue, + LPI = m_OrientationValue, + RAI = m_OrientationValue, + LAI = m_OrientationValue, + RPS = m_OrientationValue, + LPS = m_OrientationValue, + RAS = m_OrientationValue, + LAS = m_OrientationValue, + + PRI = m_OrientationValue, + PLI = m_OrientationValue, + ARI = m_OrientationValue, + ALI = m_OrientationValue, + PRS = m_OrientationValue, + PLS = m_OrientationValue, + ARS = m_OrientationValue, + ALS = m_OrientationValue, + + IPR = m_OrientationValue, + SPR = m_OrientationValue, + IAR = m_OrientationValue, + SAR = m_OrientationValue, + IPL = m_OrientationValue, + SPL = m_OrientationValue, + IAL = m_OrientationValue, + SAL = m_OrientationValue, + + PIR = m_OrientationValue, + PSR = m_OrientationValue, + AIR = m_OrientationValue, + ASR = m_OrientationValue, + PIL = m_OrientationValue, + PSL = m_OrientationValue, + AIL = m_OrientationValue, + ASL = m_OrientationValue }; -#undef ITK_ORIENTATION_ENUM - /** \brief Initialize with CoordinateEnum's from separate axes. *