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 double dA =
static_cast< double >( A );
76 const double 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 >
89 Functor::AbsoluteValueDifference2<
90 typename TInputImage1::PixelType,
91 typename TInputImage2::PixelType,
92 typename TOutputImage::PixelType > >
99 typename TInputImage1::PixelType,
100 typename TInputImage2::PixelType,
101 typename TOutputImage::PixelType >
114 #ifdef ITK_USE_CONCEPT_CHECKING
AbsoluteValueDifferenceImageFilter()
bool operator==(const AbsoluteValueDifference2 &other) const
SmartPointer< Self > Pointer
AbsoluteValueDifferenceImageFilter Self
Implements pixel-wise the computation of absolute value difference.
Base class for all process objects that output image data.
AbsoluteValueDifference2()
~AbsoluteValueDifference2()
bool operator!=(const AbsoluteValueDifference2 &) const
SmartPointer< const Self > ConstPointer
BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, Functor::AbsoluteValueDifference2< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > > Superclass
#define itkConceptMacro(name, concept)
Implements pixel-wise generic operation of two images, or of an image and a constant.
TOutput operator()(const TInput1 &A, const TInput2 &B) const
virtual ~AbsoluteValueDifferenceImageFilter() override