Bspline control points clarification

I’m trying to understand the underlying logic regarding control points in BSplineTransformInitializer. Specifically, the information regarding the control points’ location in the space. I have searched here and found out that for a third order spline, one control point extends lower and two extend upper. I really appreciate if anyone can help me (and possibly anyone who is new to ITK in future) with the following questions:

  1. how are the control points (including the extended ones) located in the space? if we define a mesh size of [5,5,5] for the BSplineTransformInitializer, how ITK will place [8,8,8] control points in the space? I could not find any documentation regarding this. Where will it start putting the control points and where it ends? with what spacing between them?
  2. Is it possible to extract the exact location of the control points in space?
  3. how am I able to define a custom grid for BSplineTransformInitializer. Let’s say I’d like to have more control points in a specific area of the image (e.g., an anatomy of interest)? is there any way that I can set the location for control points?

Thank you in advance


Could anyone please help me with my question? I really appreciate any help or comment

1 Like

Hi @adlerjohn557,

The itk::BSplineTransformInitiaizer places the BSpline grid over the domain of the image.

To visualize the relationship, the 3D Slicer Transforms module can be used to visualize ITK transforms (3D Slicer supports ITK transform files, including BSpline HDF5 transforms).

Yes. In this case, you probably want to use the itk::BSpineTransform class directly. By calling the methods SetTransformDomainOrigin, SetTransformDomomainPhysicalDimensions, SetTransformDomainDirection, and SetTransformDomainMeshSize, the location of the grid in physical space is specified.

Hope this helps,

1 Like

Thanks @matt.mccormick

I have tried 3D slicer transform visualization, it helps visually to understand the warping of the space but not the location of the control points. Especially here where we have 1 additional point added to lower bounds of the grid and two to the upper bounds (am I correct?)

which grid? the grid with Domainmeshsize that we actually want or the extended grid with Domainmeshsize+3 control points? or if I want to put it in another way: is the control point at the origin the first actual control point or the extra added control point at lower bound?

Thanks for your time

Yes, you are correct.

Right, the control point grid size is the DomainMeshSize + SplineOrder, and the control point grid surrounds the TransformDomain.

The details are here:

1 Like