28 #ifndef itkSpatialOrientationAdapter_h
29 #define itkSpatialOrientationAdapter_h
41 inline unsigned Max3(
double x,
double y,
double z)
43 const double obliquityThresholdCosineValue = 0.001;
45 double absX = vnl_math_abs(x);
46 double absY = vnl_math_abs(y);
47 double absZ = vnl_math_abs(z);
49 if ( ( absX > obliquityThresholdCosineValue ) && ( absX > absY ) && ( absX > absZ ) )
53 else if ( ( absY > obliquityThresholdCosineValue ) && ( absY > absX ) && ( absY > absZ ) )
57 else if ( ( absZ > obliquityThresholdCosineValue ) && ( absZ > absX ) && ( absZ > absY ) )
80 public OrientationAdapterBase< SpatialOrientation::ValidCoordinateOrientationFlags, 3 >
86 typedef OrientationAdapterBase< SpatialOrientation::ValidCoordinateOrientationFlags, 3 >
98 virtual OrientationType FromDirectionCosines(
const DirectionType & Dir) ITK_OVERRIDE;
101 virtual DirectionType ToDirectionCosines(
const OrientationType &
Or) ITK_OVERRIDE;
105 #endif // itkSpatialOrientationAdapter_h
Converts SpatialOrientation flags to/from direction cosines.
unsigned Max3(double x, double y, double z)
SpatialOrientationAdapter()
SuperClass::DirectionType DirectionType
SpatialOrientation::ValidCoordinateOrientationFlags OrientationType
OrientationAdapterBase< SpatialOrientation::ValidCoordinateOrientationFlags, 3 > SuperClass
SpatialOrientationAdapter Self
ValidCoordinateOrientationFlags