I’m trying to do BSpline fitting to estimate vessel centerlines given some user points.
I use the BSplineScatteredDataPointSetToImageFilter and it gives good results in most cases.
But when the parametric points are almost aligned (~ representing a straight line), the fitting tend to return a very wavy fit that really overestimate the path.
I’ve tried with varying spline order and level parameters but I’ve failed to make it works properly.
For comparison I’ve used the vtk cardinal spline fitting and it seems to give better results, but I don’t understand why.
Here an example of my problem (given points with linear interpolation ; itk fitting ; vtk fitting):
Here a working case (given points ; itk fitting):
Is it an implementation problem or should I be able to get a good fit?