18#ifndef itkImageFunction_h
19#define itkImageFunction_h
54template <
typename TInputImage,
typename TOutput,
typename TCoordRep =
float>
61 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
110 return m_Image.GetPointer();
137 for (
unsigned int j = 0; j < ImageDimension; ++j)
139 if (index[j] < m_StartIndex[j])
143 if (index[j] > m_EndIndex[j])
158 for (
unsigned int j = 0; j < ImageDimension; ++j)
161 if (!(index[j] >= m_StartContinuousIndex[j] && index[j] < m_EndContinuousIndex[j]))
180 bool isInside = IsInsideBuffer(index);
190 this->ConvertContinuousIndexToNearestIndex(cindex, index);
198 cindex = m_Image->template TransformPhysicalPointToContinuousIndex<TCoordRep>(
point);
205 index.CopyWithRound(cindex);
232#ifndef ITK_MANUAL_INSTANTIATION
233# include "itkImageFunction.hxx"
A templated class holding a point in n-Dimensional image space.
Base class for all ITK function objects.
Evaluates a function of an image at specified position.
const InputImageType * GetInputImage() const
void ConvertContinuousIndexToNearestIndex(const ContinuousIndexType &cindex, IndexType &index) const
TInputImage InputImageType
virtual TOutput EvaluateAtContinuousIndex(const ContinuousIndexType &index) const =0
virtual bool IsInsideBuffer(const PointType &point) const
typename InputImageType::PixelType InputPixelType
virtual bool IsInsideBuffer(const ContinuousIndexType &index) const
virtual bool IsInsideBuffer(const IndexType &index) const
~ImageFunction() override=default
OutputType Evaluate(const PointType &point) const override=0
void ConvertPointToContinuousIndex(const PointType &point, ContinuousIndexType &cindex) const
void ConvertPointToNearestIndex(const PointType &point, IndexType &index) const
typename InputImageType::IndexValueType IndexValueType
virtual void SetInputImage(const InputImageType *ptr)
void PrintSelf(std::ostream &os, Indent indent) const override
virtual TOutput EvaluateAtIndex(const IndexType &index) const =0
typename InputImageType::ConstPointer InputImageConstPointer
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.
SmartPointer< const Self > ConstPointer
ImageBaseType::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*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