What does the B-spline transformation mean in Elastix?

Hello,
I registered the MRI and the CT of the same subject using Elastix module. (MRI is the reference image and CT is movable image. ) The result contains B-spline transform:

图片2

And it seems the B-spline transformation alone is non-rigid (shown as the figure below):

I also use SPM to do the registration, and just got a linear matrix. And I have validated the correctness of the result.

What does the B-spline transformation here really mean?
Does it correspond to the “reslice” step of registration? Or maybe it really means a free-form deformation? if so, why does a whithin-subject transformation contain non-rigid transformation?

These questions have been bothering me for days.

Thanks!
Drake

It means that B-spline transformation parameters are adjusted by the registration optimizer while trying to align the moving and fixed image. B-spline is a warping transformation that uses a sparse grid of control points and b-spline interpolation to compute displacement vectors between the control points.

It is not related to reslice. You can use any kind of transform for reslicing (resampling) a volume.

Free-form deformation usually refers to warping an image with a dense displacement field, where each point of the fixed image may mapped to anywhere in 3D space. B-spline uses a sparse set of control points, so I would not consider it free-form deformation.

There can be many reasons, including changes in shape of the patient (different posture, different jaw position, different padding of the scanner pushing soft tissue around, internal swelling, different filling of internal structures, patient gains/loses weight, etc.), different cropping of images (e.g., nose is cut off in one image but not in the other) or image artifacts. Visual inspection should clearly answer this question.

If you prefer to use a rigid transformation - for example: you want to register a bones in two images that were taken at almost the same time - then you can choose a rigid registration preset that does not attempt to get better alignment by warping.

1 Like

Slicer relies on ITK for registration primitives. See the ITK book for more details.

1 Like

Humans are squishy!

More info on elastix: https://elastix.lumc.nl/download/elastix-5.1.0-manual.pdf
On using b-splines for medical image registration: http://image.diku.dk/imagecanon/material/Rueckert-IEEETMI1999.pdf

1 Like

Thank you so much for your reply!!

I did want to register skull in two images and also try the ‘generic rigid(all)’ preset, that I’m not sure correct or not. But the results still contain B-spline transformation, it also made me confused.

By the way,

  1. Does the result world-to-world transformation matrix (RAS space), rather than voxel-to-voxel (image space)?
  2. If I just want to use the B-spline results to transform the skull COR from CT scan into MRI space in codes, what information or document can I access to? I only know the GUI method for B-spline transformation now.

You’ve found a bug! (result of some recent code refactoring) When you selected the rigid preset, it got reverted to the default preset because the two presets had the same ID. The issue is now fixed, update SlicerElastix extension to get the updated version of the extension (only on latest Slicer Stable Release or very latest Slicer Preview Release).

It is up to each library and application to decide how to organize the voxels in memory and assign IJK coordinates to voxels. However, medical imaging file formats unambiguously specify where the voxels are in physical space. Therefore specifying transformation in voxel space is not an option, but registration methods must always provide transformation in physical space.

You have access to all information (most notably the computed transform) and you can do anything with it (save to ITK transform file, use it to resample the moving image, warp segmentations, models, markups with the transform, etc. each by a few lines of Python script). You can find examples in the Slicer script repository, in Slicer forum posts, tests, and examples, which you can find using Google, you can often get fully functional Python code by asking Bing chat, and you can of course also ask specific questions here from us.

2 Likes