18 #ifndef itkAbsoluteValueDifferenceImageFilter_h
19 #define itkAbsoluteValueDifferenceImageFilter_h
56 template<
typename TInput1,
typename TInput2,
typename TOutput >
69 return !( *
this != other );
73 const TInput2 & B)
const
75 const auto dA =
static_cast< double >( A );
76 const auto dB =
static_cast< double >( B );
77 const double diff = dA - dB;
78 const double absdiff = ( diff > 0.0 ) ? diff : -diff;
80 return static_cast< TOutput
>( absdiff );
85 template<
typename TInputImage1,
typename TInputImage2,
typename TOutputImage >
102 typename TInputImage2::PixelType,
103 typename TOutputImage::PixelType >;
112 #ifdef ITK_USE_CONCEPT_CHECKING
126 #if !defined( ITK_WRAPPING_PARSER )
~AbsoluteValueDifference2()=default
AbsoluteValueDifferenceImageFilter()
bool operator==(const AbsoluteValueDifference2 &other) const
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Implements pixel-wise the computation of absolute value difference.
Base class for all process objects that output image data.
Functor::AbsoluteValueDifference2< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > FunctorType
bool operator!=(const AbsoluteValueDifference2 &) const
Implements pixel-wise generic operation of two images, or of an image and a constant.
void SetFunctor(const std::function< ConstRefFunctionType > &f)
AbsoluteValueDifference2()=default
#define itkConceptMacro(name, concept)
~AbsoluteValueDifferenceImageFilter() override=default
TOutput operator()(const TInput1 &A, const TInput2 &B) const