18 #ifndef itkComplexToModulusImageAdaptor_h
19 #define itkComplexToModulusImageAdaptor_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)
57 return (TExternalType)( std::sqrt( input.real() * input.real()
58 + input.imag() * input.imag() ) );
73 template<
typename TImage,
typename TOutputPixelType >
76 Accessor::ComplexToModulusPixelAccessor<
77 typename TImage::PixelType,
86 typename TImage::PixelType,
Give access to the Modulus of a std::complex<> value.
ComplexToModulusImageAdaptor()=default
Presents a complex image as being composed of std::abs() part of its pixels.
static void Set(TInternalType &output, const TExternalType &input)
static TExternalType Get(const TInternalType &input)
TOutputPixelType ExternalType
~ComplexToModulusImageAdaptor() override=default
TImage::PixelType InternalType
Give access to partial aspects of voxels from an Image.
Base class for most ITK classes.
Base class for all data objects in ITK.