18#ifndef itkAbsImageAdaptor_h
19#define itkAbsImageAdaptor_h
39template <
typename TInternalType,
typename TExternalType>
53 Set(TInternalType & output,
const TExternalType & input)
55 output = (TInternalType)((input > TExternalType{}) ? input : -input);
58 static inline TExternalType
59 Get(
const TInternalType & input)
61 return (TExternalType)((input > TInternalType{}) ? input : -input);
76template <
typename TImage,
typename TOutputPixelType>
78 :
public ImageAdaptor<TImage, Accessor::AbsPixelAccessor<typename TImage::PixelType, TOutputPixelType>>
Presents an image as being composed of the itk::Math::abs() of its pixels.
AbsImageAdaptor()=default
~AbsImageAdaptor() override=default
Give access to the itk::Math::abs() function of a value.
TExternalType ExternalType
static TExternalType Get(const TInternalType &input)
static void Set(TInternalType &output, const TExternalType &input)
TInternalType InternalType
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....