18 #ifndef itkImageFunction_h
19 #define itkImageFunction_h
54 template <
typename TInputImage,
typename TOutput,
typename TCoordRep =
float>
61 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
110 return m_Image.GetPointer();
121 EvaluateAtIndex(
const IndexType & index)
const = 0;
126 EvaluateAtContinuousIndex(
const ContinuousIndexType & index)
const = 0;
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);
208 itkGetConstReferenceMacro(StartIndex,
IndexType);
209 itkGetConstReferenceMacro(EndIndex,
IndexType);
211 itkGetConstReferenceMacro(StartContinuousIndex, ContinuousIndexType);
212 itkGetConstReferenceMacro(EndContinuousIndex, ContinuousIndexType);
218 PrintSelf(std::ostream & os,
Indent indent)
const override;
232 #ifndef ITK_MANUAL_INSTANTIATION
233 # include "itkImageFunction.hxx"