18 #ifndef itkSumOfSquaresImageFunction_h
19 #define itkSumOfSquaresImageFunction_h
43 template<
typename TInputImage,
typename TCoordRep =
float >
45 public ImageFunction< TInputImage, typename NumericTraits< typename TInputImage::PixelType >::RealType,
80 itkStaticConstMacro(ImageDimension,
unsigned int,
81 InputImageType::ImageDimension);
95 this->ConvertPointToNearestIndex(point, index);
96 return this->EvaluateAtIndex(index);
104 this->ConvertContinuousIndexToNearestIndex(cindex, index);
105 return this->EvaluateAtIndex(index);
110 itkGetConstReferenceMacro(NeighborhoodRadius,
unsigned int);
114 m_NeighborhoodRadius = radius;
116 m_NeighborhoodSize = 1;
117 long twoRPlus1 = 2 * m_NeighborhoodRadius + 1;
118 for (
unsigned int i = 0; i < ImageDimension; i++ )
120 m_NeighborhoodSize *= twoRPlus1;
124 itkGetConstReferenceMacro(NeighborhoodSize,
unsigned int);
129 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkSumOfSquaresImageFunction.hxx"
NumericTraits< typename InputImageType::PixelType >::RealType RealType
Calculate the sum of squares in the neighborhood of a pixel.
Light weight base class for most itk classes.
SumOfSquaresImageFunction Self
Superclass::IndexType IndexType
unsigned int m_NeighborhoodRadius
~SumOfSquaresImageFunction() override
Superclass::PointType PointType
virtual RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
SmartPointer< const Self > ConstPointer
Superclass::OutputType OutputType
Superclass::ContinuousIndexType ContinuousIndexType
unsigned int m_NeighborhoodSize
ImageFunction< TInputImage, typename NumericTraits< typename TInputImage::PixelType >::RealType, TCoordRep > Superclass
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
Control indentation during Print() invocation.
TInputImage InputImageType
Evaluates a function of an image at specified position.
virtual RealType Evaluate(const PointType &point) const override
void SetNeighborhoodRadius(unsigned int radius)
ImageBaseType::IndexType IndexType