18#ifndef itkMeanImageFunction_h
19#define itkMeanImageFunction_h
48template <
typename TInputImage,
typename TCoordRep =
float>
50 :
public ImageFunction<TInputImage, typename NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
73 using typename Superclass::InputPixelType;
76 using typename Superclass::OutputType;
82 using typename Superclass::ContinuousIndexType;
91 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
106 this->ConvertPointToNearestIndex(
point, index);
107 return this->EvaluateAtIndex(index);
115 this->ConvertContinuousIndexToNearestIndex(cindex, index);
116 return this->EvaluateAtIndex(index);
123 itkGetConstReferenceMacro(NeighborhoodRadius,
unsigned int);
133 unsigned int m_NeighborhoodRadius{ 1 };
136 ImageSizeType::Filled(1)) };
140#ifndef ITK_MANUAL_INSTANTIATION
141# include "itkMeanImageFunction.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.
Calculate the mean value in the neighborhood of a pixel.
typename NumericTraits< typename InputImageType::PixelType >::RealType RealType
typename InputImageType::SizeType ImageSizeType
void SetNeighborhoodRadius(unsigned int)
TInputImage InputImageType
RealType EvaluateAtIndex(const IndexType &index) const override
~MeanImageFunction() override=default
RealType Evaluate(const PointType &point) const override
RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
void PrintSelf(std::ostream &os, Indent indent) const override
A templated class holding a geometric point in n-Dimensional space.
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