Hi, I’m trying to do a registration using BSplines of order 4. However, when I set 4 to the parameter ‘order’ in the BSplineTransformInitializer constructor, I got the following message: “sitk::ERROR: Invalid Order: 4 only orders 0, 1, 2, and 3 supported!”.
So, Is There a way to do this registration using SimpleITK? And using ITK?
Most likely you can achieve sufficiently smooth displacement field with 3rd order spline and appropriately dense grid of control points. But if you really want to have higher-order spline then most likely you just need to add 2 lines of code to sitkBSplineTransformInitializerFilter.cxx in SimpleITK.
I suspect that ITK does not support 4th order b-splines. Maybe some filter’s or data representations do, but likely not enough for a complete workflow. SimpleITK supports 1, 2, and 3 order b-splines. Likely higher orders did not compile when this feature is added.
The fourth order b-spline can be enabled by adding a 4 for the VSplineOrder when building an itk::BSplineTransform, and this can be supplied to the itk::BSplineTransformInitializer. The ITK Python wrapping provides 3rd order transform support out of the box. In general, if the goal is to increase transform flexibility, it is better to use a denser bspline grid over a higher order transform.