Trying to solve #61 I found that the interpolator that is used to calculate the gradient is always linear
|
using InterpolateImageFunctionType = LinearInterpolateImageFunction<TInputImage, TCoordRep>; |
and not using the interpolator that is (possibly) set for the cost function
|
/** Get/set the Interpolator. */ |
|
itkSetObjectMacro( Interpolator, InterpolatorType ); |
|
itkGetConstObjectMacro( Interpolator, InterpolatorType ); |
It seems the cost function interpolator is used in case iterateNeighborhoodOptimizer (which uses
GetValue) is employed
|
return static_cast<MeasureType>( m_Interpolator->Evaluate(point) ); |
but not when the gradient is computed (which uses
GetDerivative)
|
output = m_GradientImageFunction->Evaluate(point); |
This however does not seem to be the issue of #61 (where a linear interpolator was used anyway), so posting as an issue on its own.
Trying to solve #61 I found that the interpolator that is used to calculate the gradient is always linear
ITKMinimalPathExtraction/include/itkPhysicalCentralDifferenceImageFunction.h
Line 86 in 2ff1ab5
and not using the interpolator that is (possibly) set for the cost function
ITKMinimalPathExtraction/include/itkSingleImageCostFunction.h
Lines 105 to 107 in 2ff1ab5
It seems the cost function interpolator is used in case iterateNeighborhoodOptimizer (which uses
GetValue) is employedITKMinimalPathExtraction/include/itkSingleImageCostFunction.hxx
Line 102 in 2ff1ab5
but not when the gradient is computed (which uses
GetDerivative)ITKMinimalPathExtraction/include/itkSingleImageCostFunction.hxx
Line 137 in 2ff1ab5
This however does not seem to be the issue of #61 (where a linear interpolator was used anyway), so posting as an issue on its own.