Parameters in BSplineTransform

I’m trying to register images using BSplineTransform. I’m not clear about the total number of parameters in case of BSplineTransform. In the case of AffineTransform, for 3D images, there are 12 parameters and I can count them as the parameters from translation and affine matrix. Can the number of parameters in BSplineTransform be understood in the same way? For a BSplineTransform consisting of cubic spline for the 2D image, the number of parameters is 32. Can someone guide me to some relevant literature regarding the parameters of BSplineTransform or provide some intuition. I have some understanding of BSpline curves, control points and their formation. However, I am not able to get the reasoning behind the total number of parameters while using BSplineTransform in sitk. Thanks in advance :slight_smile:

Hello @prms,

The number of parameters of your BSpline transform depends on your settings, it isn’t a constant as with the 3D Affine. It is defined by the grid mesh size SetTransformDomainMeshSize and the spline order specified in the BSplineTransform constructor.

For example if we set the mesh size for a 2D BSplineTransform to [4,3] and use a cubic spline order then the actual mesh size used becomes [4+3, 3+3], and as we are in 2D the total number of parameters is 7*6*2. The parameters denote the delta/motion of the control points from their original positions. The more complex the deformation you need, the more control points and thus more parameters. For additional details, please take a look at the original ITK documentation, section titled “Detailed Description”.

4 Likes

Thanks @zivy :). You’ve been of great help.

Hey, @prms. You can play with this gist I made some months ago to understand this myself: https://gist.github.com/fepegar/b723d15de620cd2a3a4dbd71e491b59d

3 Likes

Thanks…great resource

The parameters of the B-spline transform are the control points ( B-spline coefficients). ITK implementation is based on Unser paper. EPFL website offers nice presentations like this, and also an open-source for the implementation as well.

2 Likes

Hi @zivy, what is the reason behind adding spline order to mesh size? Can you point me to any reference/paper/maths that is used in SITK implementation of BSplineTransform?

Thanks,

Hi @prms,

This has to do with the treatment of the endpoints of the BSpline knot sequence, so that they have full support. For a brief overview see wikipedia. If you are really interested in the mathematics underlying BSplines I suggest reading the B(asic)-Spline Basics by Carl de Boor.

2 Likes