18 #ifndef itkComplexToPhaseImageAdaptor_h
19 #define itkComplexToPhaseImageAdaptor_h
40 template<
typename TInternalType,
typename TExternalType >
52 static inline void Set(TInternalType & output,
const TExternalType & input)
53 { output = (TInternalType)( input ); }
55 static inline TExternalType
Get(
const TInternalType & input)
56 {
return (TExternalType)( std::atan2( input.imag(), input.real() ) ); }
69 template<
typename TImage,
typename TOutputPixelType >
72 Accessor::ComplexToPhasePixelAccessor<
73 typename TImage::PixelType,
82 typename TImage::PixelType,
ComplexToPhaseImageAdaptor()=default
TOutputPixelType ExternalType
Give access to the Phase part of a std::complex<> value.
~ComplexToPhaseImageAdaptor() override=default
Presents a complex image as being composed of arg() part of its pixels.
static TExternalType Get(const TInternalType &input)
TImage::PixelType InternalType
Give access to partial aspects of voxels from an Image.
Base class for most ITK classes.
static void Set(TInternalType &output, const TExternalType &input)
Base class for all data objects in ITK.