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
Presents a complex image as being composed of itk::Math::abs() part of its pixels.
ComplexToModulusImageAdaptor()=default
~ComplexToModulusImageAdaptor() override=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....