18#ifndef itkComplexToModulusImageAdaptor_h
19#define itkComplexToModulusImageAdaptor_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::sqrt(input.real() * input.real() + input.imag() * input.imag()));
79template <
typename TImage,
typename TOutputPixelType>
81 :
public ImageAdaptor<TImage, Accessor::ComplexToModulusPixelAccessor<typename TImage::PixelType, TOutputPixelType>>
Give access to the Modulus of a std::complex<> value.
static TExternalType Get(const TInternalType &input)
TExternalType ExternalType
static void Set(TInternalType &output, const TExternalType &input)
TInternalType InternalType
ComplexToModulusImageAdaptor Self
SmartPointer< Self > Pointer
ComplexToModulusImageAdaptor()=default
SmartPointer< const Self > ConstPointer
~ComplexToModulusImageAdaptor() override=default
ImageAdaptor< TImage, Accessor::ComplexToModulusPixelAccessor< typename TImage::PixelType, TOutputPixelType > > Superclass
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....