18 #ifndef itkSquaredDifferenceImageFilter_h
19 #define itkSquaredDifferenceImageFilter_h
55 template<
typename TInput1,
typename TInput2,
typename TOutput >
68 return !( *
this != other );
72 const TInput2 & B)
const
74 const auto dA =
static_cast< double >( A );
75 const auto dB =
static_cast< double >( B );
76 const double diff = dA - dB;
78 return static_cast< TOutput
>( diff * diff );
83 template<
typename TInputImage1,
typename TInputImage2,
typename TOutputImage >
99 typename TInputImage2::PixelType,
100 typename TOutputImage::PixelType >;
109 #ifdef ITK_USE_CONCEPT_CHECKING
123 #if !defined( ITK_WRAPPING_PARSER )
SquaredDifference2()=default
SquaredDifferenceImageFilter()
~SquaredDifference2()=default
bool operator==(const SquaredDifference2 &other) const
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
~SquaredDifferenceImageFilter() override=default
Functor::SquaredDifference2< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > FunctorType
Implements pixel-wise generic operation of two images, or of an image and a constant.
bool operator!=(const SquaredDifference2 &) const
void SetFunctor(const std::function< ConstRefFunctionType > &f)
Implements pixel-wise the computation of squared difference.
TOutput operator()(const TInput1 &A, const TInput2 &B) const
#define itkConceptMacro(name, concept)