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,
81 static constexpr
unsigned int ImageDimension = InputImageType::ImageDimension;
94 this->ConvertPointToNearestIndex(point, index);
95 return this->EvaluateAtIndex(index);
103 this->ConvertContinuousIndexToNearestIndex(cindex, index);
104 return this->EvaluateAtIndex(index);
109 itkGetConstReferenceMacro(NeighborhoodRadius,
unsigned int);
113 m_NeighborhoodRadius = radius;
115 m_NeighborhoodSize = 1;
116 long twoRPlus1 = 2 * m_NeighborhoodRadius + 1;
117 for (
unsigned int i = 0; i < ImageDimension; i++ )
119 m_NeighborhoodSize *= twoRPlus1;
123 itkGetConstReferenceMacro(NeighborhoodSize,
unsigned int);
128 void PrintSelf(std::ostream & os,
Indent indent)
const override;
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkSumOfSquaresImageFunction.hxx"
typename 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.
unsigned int m_NeighborhoodRadius
RealType Evaluate(const PointType &point) const override
Define numeric traits for std::vector.
RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
unsigned int m_NeighborhoodSize
typename Superclass::PointType PointType
ImageBaseType::IndexType IndexType
typename Superclass::OutputType OutputType
typename Superclass::IndexType IndexType
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
typename Superclass::ContinuousIndexType ContinuousIndexType
TInputImage InputImageType
Evaluates a function of an image at specified position.
void SetNeighborhoodRadius(unsigned int radius)