18#ifndef itkSumOfSquaresImageFunction_h
19#define itkSumOfSquaresImageFunction_h
46template <
typename TInputImage,
typename TCoordRep =
float>
48 :
public ImageFunction<TInputImage, typename NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
71 using typename Superclass::InputPixelType;
74 using typename Superclass::OutputType;
80 using typename Superclass::ContinuousIndexType;
89 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
104 this->ConvertPointToNearestIndex(
point, index);
105 return this->EvaluateAtIndex(index);
113 this->ConvertContinuousIndexToNearestIndex(cindex, index);
114 return this->EvaluateAtIndex(index);
119 itkGetConstReferenceMacro(NeighborhoodRadius,
unsigned int);
125 m_NeighborhoodRadius = radius;
126 m_NeighborhoodSize = m_NeighborhoodOffsets.size();
129 itkGetConstReferenceMacro(NeighborhoodSize,
unsigned int);
138 unsigned int m_NeighborhoodRadius{};
139 unsigned int m_NeighborhoodSize{};
142 ImageSizeType::Filled(1)) };
146#ifndef ITK_MANUAL_INSTANTIATION
147# include "itkSumOfSquaresImageFunction.hxx"
Evaluates a function of an image at specified position.
typename InputImageType::IndexType IndexType
Control indentation during Print() invocation.
Light weight base class for most itk classes.
A templated class holding a geometric point in n-Dimensional space.
Calculate the sum of squares in the neighborhood of a pixel.
RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
void SetNeighborhoodRadius(unsigned int radius)
RealType Evaluate(const PointType &point) const override
void PrintSelf(std::ostream &os, Indent indent) const override
SumOfSquaresImageFunction()
RealType EvaluateAtIndex(const IndexType &index) const override
typename NumericTraits< typename InputImageType::PixelType >::RealType RealType
~SumOfSquaresImageFunction() override=default
TInputImage InputImageType
typename InputImageType::SizeType ImageSizeType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
std::vector< Offset< VImageDimension > > GenerateRectangularImageNeighborhoodOffsets(const Size< VImageDimension > &radius)
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents