28 #ifndef itkBSplineInterpolateImageFunction_h
29 #define itkBSplineInterpolateImageFunction_h
34 #include "vnl/vnl_matrix.h"
81 template <
typename TImageType,
typename TCoordRep =
double,
typename TCoefficientType =
double>
106 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
147 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
149 return (this->EvaluateAtContinuousIndex(index));
157 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
158 return (this->EvaluateAtContinuousIndex(index, threadId));
166 vnl_matrix<long> evaluateIndex(ImageDimension, (m_SplineOrder + 1));
167 vnl_matrix<double> weights(ImageDimension, (m_SplineOrder + 1));
171 return this->EvaluateAtContinuousIndexInternal(index, evaluateIndex, weights);
175 EvaluateAtContinuousIndex(
const ContinuousIndexType & x,
ThreadIdType threadId)
const;
182 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
184 return (this->EvaluateDerivativeAtContinuousIndex(index));
192 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
193 return (this->EvaluateDerivativeAtContinuousIndex(index, threadId));
203 vnl_matrix<long> evaluateIndex(ImageDimension, (m_SplineOrder + 1));
204 vnl_matrix<double> weights(ImageDimension, (m_SplineOrder + 1));
205 vnl_matrix<double> weightsDerivative(ImageDimension, (m_SplineOrder + 1));
210 return this->EvaluateDerivativeAtContinuousIndexInternal(x, evaluateIndex, weights, weightsDerivative);
214 EvaluateDerivativeAtContinuousIndex(
const ContinuousIndexType & x,
ThreadIdType threadId)
const;
221 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
224 this->EvaluateValueAndDerivativeAtContinuousIndex(index, value, deriv);
235 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
236 this->EvaluateValueAndDerivativeAtContinuousIndex(index, value, deriv, threadId);
248 vnl_matrix<long> evaluateIndex(ImageDimension, (m_SplineOrder + 1));
249 vnl_matrix<double> weights(ImageDimension, (m_SplineOrder + 1));
250 vnl_matrix<double> weightsDerivative(ImageDimension, (m_SplineOrder + 1));
255 this->EvaluateValueAndDerivativeAtContinuousIndexInternal(
256 x, value, deriv, evaluateIndex, weights, weightsDerivative);
260 EvaluateValueAndDerivativeAtContinuousIndex(
const ContinuousIndexType & x,
262 CovariantVectorType & derivativeValue,
268 SetSplineOrder(
unsigned int SplineOrder);
270 itkGetConstMacro(SplineOrder,
int);
279 SetInputImage(
const TImageType * inputData)
override;
291 itkSetMacro(UseImageDirection,
bool);
292 itkGetConstMacro(UseImageDirection,
bool);
293 itkBooleanMacro(UseImageDirection);
299 return SizeType::Filled(m_SplineOrder + 1);
322 EvaluateAtContinuousIndexInternal(
const ContinuousIndexType & x,
323 vnl_matrix<long> & evaluateIndex,
324 vnl_matrix<double> & weights)
const;
327 EvaluateValueAndDerivativeAtContinuousIndexInternal(
const ContinuousIndexType & x,
329 CovariantVectorType & derivativeValue,
330 vnl_matrix<long> & evaluateIndex,
331 vnl_matrix<double> & weights,
332 vnl_matrix<double> & weightsDerivative)
const;
334 virtual CovariantVectorType
335 EvaluateDerivativeAtContinuousIndexInternal(
const ContinuousIndexType & x,
336 vnl_matrix<long> & evaluateIndex,
337 vnl_matrix<double> & weights,
338 vnl_matrix<double> & weightsDerivative)
const;
343 PrintSelf(std::ostream & os,
Indent indent)
const override;
360 const vnl_matrix<long> & EvaluateIndex,
361 vnl_matrix<double> & weights,
362 unsigned int splineOrder)
const;
367 const vnl_matrix<long> & EvaluateIndex,
368 vnl_matrix<double> & weights,
369 unsigned int splineOrder)
const;
374 GeneratePointsToIndex();
378 DetermineRegionOfSupport(vnl_matrix<long> & evaluateIndex,
380 unsigned int splineOrder)
const;
385 ApplyMirrorBoundaryConditions(vnl_matrix<long> & evaluateIndex,
unsigned int splineOrder)
const;
412 #ifndef ITK_MANUAL_INSTANTIATION
413 # include "itkBSplineInterpolateImageFunction.hxx"