18 #ifndef itkImageFunction_h
19 #define itkImageFunction_h
54 template <
typename TInputImage,
typename TOutput,
typename TCoordinate =
float>
61 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
88 #ifndef ITK_FUTURE_LEGACY_REMOVE
89 using CoordRepType ITK_FUTURE_DEPRECATED(
90 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") =
CoordinateType;
114 return m_Image.GetPointer();
125 EvaluateAtIndex(
const IndexType & index)
const = 0;
130 EvaluateAtContinuousIndex(
const ContinuousIndexType & index)
const = 0;
141 for (
unsigned int j = 0; j < ImageDimension; ++j)
143 if (index[j] < m_StartIndex[j])
147 if (index[j] > m_EndIndex[j])
162 for (
unsigned int j = 0; j < ImageDimension; ++j)
165 if (!(index[j] >= m_StartContinuousIndex[j] && index[j] < m_EndContinuousIndex[j]))
184 const bool isInside = IsInsideBuffer(index);
194 this->ConvertContinuousIndexToNearestIndex(cindex, index);
202 cindex = m_Image->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
209 index.CopyWithRound(cindex);
212 itkGetConstReferenceMacro(StartIndex,
IndexType);
213 itkGetConstReferenceMacro(EndIndex,
IndexType);
215 itkGetConstReferenceMacro(StartContinuousIndex, ContinuousIndexType);
216 itkGetConstReferenceMacro(EndContinuousIndex, ContinuousIndexType);
222 PrintSelf(std::ostream & os,
Indent indent)
const override;
236 #ifndef ITK_MANUAL_INSTANTIATION
237 # include "itkImageFunction.hxx"