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();
116 Evaluate(
const PointType & point)
const override = 0;
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]))
177 m_Image->TransformPhysicalPointToContinuousIndex(point, index);
181 bool isInside = IsInsideBuffer(index);
192 m_Image->TransformPhysicalPointToContinuousIndex(point, cindex);
193 this->ConvertContinuousIndexToNearestIndex(cindex, index);
200 m_Image->TransformPhysicalPointToContinuousIndex(point, cindex);
207 index.CopyWithRound(cindex);
210 itkGetConstReferenceMacro(StartIndex,
IndexType);
211 itkGetConstReferenceMacro(EndIndex,
IndexType);
213 itkGetConstReferenceMacro(StartContinuousIndex, ContinuousIndexType);
214 itkGetConstReferenceMacro(EndContinuousIndex, ContinuousIndexType);
220 PrintSelf(std::ostream & os,
Indent indent)
const override;
234 #ifndef ITK_MANUAL_INSTANTIATION
235 # include "itkImageFunction.hxx"