18#ifndef itkComplexToPhaseImageAdaptor_h
19#define itkComplexToPhaseImageAdaptor_h
41template <
typename TInternalType,
typename TExternalType>
55 Set(TInternalType & output,
const TExternalType & input)
57 output = (TInternalType)(input);
60 static inline TExternalType
61 Get(
const TInternalType & input)
63 return (TExternalType)(std::atan2(input.imag(), input.real()));
78template <
typename TImage,
typename TOutputPixelType>
80 :
public ImageAdaptor<TImage, Accessor::ComplexToPhasePixelAccessor<typename TImage::PixelType, TOutputPixelType>>
Give access to the Phase part of a std::complex<> value.
static TExternalType Get(const TInternalType &input)
static void Set(TInternalType &output, const TExternalType &input)
TExternalType ExternalType
TInternalType InternalType
Presents a complex image as being composed of arg() part of its pixels.
~ComplexToPhaseImageAdaptor() override=default
ComplexToPhaseImageAdaptor()=default
Base class for all data objects in ITK.
Give access to partial aspects of voxels from an Image.
Base class for most ITK classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....