28 #ifndef __itkBSplineInterpolateImageFunction_h
29 #define __itkBSplineInterpolateImageFunction_h
34 #include "vnl/vnl_matrix.h"
82 class TCoordRep = double,
83 class TCoefficientType =
double >
101 typedef typename Superclass::OutputType
OutputType;
107 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::ImageDimension);
124 itkGetStaticConstMacro(ImageDimension) >
133 itkGetStaticConstMacro(ImageDimension) >
148 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
151 return ( this->EvaluateAtContinuousIndex(index) );
159 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
161 return ( this->EvaluateAtContinuousIndex(index, threadID) );
169 vnl_matrix< long > evaluateIndex( ImageDimension, ( m_SplineOrder + 1 ) );
170 vnl_matrix< double > weights( ImageDimension, ( m_SplineOrder + 1 ) );
174 return this->EvaluateAtContinuousIndexInternal(index,
179 virtual OutputType EvaluateAtContinuousIndex(
const ContinuousIndexType &
187 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
190 return ( this->EvaluateDerivativeAtContinuousIndex(index) );
198 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
200 return ( this->EvaluateDerivativeAtContinuousIndex(index, threadID) );
210 vnl_matrix< long > evaluateIndex( ImageDimension, ( m_SplineOrder + 1 ) );
211 vnl_matrix< double > weights( ImageDimension, ( m_SplineOrder + 1 ) );
212 vnl_matrix< double > weightsDerivative( ImageDimension, ( m_SplineOrder + 1 ) );
217 return this->EvaluateDerivativeAtContinuousIndexInternal(x,
223 CovariantVectorType EvaluateDerivativeAtContinuousIndex(
224 const ContinuousIndexType & x,
227 void EvaluateValueAndDerivative(
const PointType & point,
233 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
237 this->EvaluateValueAndDerivativeAtContinuousIndex(index,
242 void EvaluateValueAndDerivative(
const PointType & point,
249 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
251 this->EvaluateValueAndDerivativeAtContinuousIndex(index,
257 void EvaluateValueAndDerivativeAtContinuousIndex(
267 vnl_matrix< long > evaluateIndex( ImageDimension, ( m_SplineOrder + 1 ) );
268 vnl_matrix< double > weights( ImageDimension, ( m_SplineOrder + 1 ) );
269 vnl_matrix< double > weightsDerivative( ImageDimension, ( m_SplineOrder + 1 ) );
274 this->EvaluateValueAndDerivativeAtContinuousIndexInternal(x,
282 void EvaluateValueAndDerivativeAtContinuousIndex(
283 const ContinuousIndexType & x,
285 CovariantVectorType & deriv,
290 void SetSplineOrder(
unsigned int SplineOrder);
292 itkGetConstMacro(SplineOrder,
int);
299 virtual void SetInputImage(
const TImageType *inputData);
311 itkSetMacro(UseImageDirection,
bool);
312 itkGetConstMacro(UseImageDirection,
bool);
313 itkBooleanMacro(UseImageDirection);
336 virtual OutputType EvaluateAtContinuousIndexInternal(
const ContinuousIndexType & index,
337 vnl_matrix< long > & evaluateIndex,
338 vnl_matrix< double > & weights)
const;
340 virtual void EvaluateValueAndDerivativeAtContinuousIndexInternal(
const ContinuousIndexType & x,
342 CovariantVectorType & derivativeValue,
343 vnl_matrix< long > & evaluateIndex,
344 vnl_matrix< double > & weights,
345 vnl_matrix< double > & weightsDerivative
348 virtual CovariantVectorType EvaluateDerivativeAtContinuousIndexInternal(
const ContinuousIndexType & x,
349 vnl_matrix< long > & evaluateIndex,
350 vnl_matrix< double > & weights,
351 vnl_matrix< double > & weightsDerivative
356 void PrintSelf(std::ostream & os,
Indent indent)
const;
371 void operator=(
const Self &);
375 const vnl_matrix< long > & EvaluateIndex,
376 vnl_matrix< double > & weights,
377 unsigned int splineOrder)
const;
381 const vnl_matrix< long > & EvaluateIndex,
382 vnl_matrix< double > & weights,
383 unsigned int splineOrder)
const;
387 void GeneratePointsToIndex();
390 void DetermineRegionOfSupport(vnl_matrix< long > & evaluateIndex,
392 unsigned int splineOrder)
const;
396 void ApplyMirrorBoundaryConditions(vnl_matrix< long > & evaluateIndex,
397 unsigned int splineOrder)
const;
424 #ifndef ITK_MANUAL_INSTANTIATION
425 #include "itkBSplineInterpolateImageFunction.hxx"