Expert automated registration

Hi everyone,

I’m working on a project about registration of MR and CT images of pelvis. The only module that works for me without providing initial manual transformation is Expert Automated module which registers when the CT is the fixed Volume and MR is the moving. When I put MR as the fixed volume not only I don’t get an alignment but also the field of view changes. I’m attaching the result of both. I need to know what is the reason and how do I know which parameters and in which way should I change them to improve my results? I appreciate any help.

Expert automated registration is a very basic registration method, which require extensive parameter tuning. I would recommend to use SlicerElastix extension instead. Its default registration presets work without the need for any parameter adjustments. See more information here.

Thanks very much for your reply. I have tried Elastix and Brainsfit but no luck. I get this line in my Errorlog: Stop condition from optimizer.RegularStepGradientDescentOptimizerv4: Step too small after 481 iterations. Current step (0.00078125) is less than minimum step (0.001).
Does this mean that the optimization is stuck in an extrema ?

By comparing the volumes in the slicer I see that the coronal and sagittal views need a simple translation but the axial views seem flipped or very far away to me (please find attached the picture). I have tried transforming the right/left axes in the transform matrix of Transform module and also centering the volumes but the registration still does not work.

Is there any way to do changes on the axial view only? like rebuilding or flipping the slices?

When I do manual transform I have to put the Inferior Superior scroll bar of translation on -206.0000mm to be able to match the geometry. Does this distant seem out of reach for the registration algorithms to work ?

It is good, it means that the solution converged. It might not have been the global optimum, though.

Brainsfit requires parameter tuning, so I would recommend to start with Elastix.

For all automatic intensity-based image registration you need to prealign the images, to have not more than a 5-10 mm and 5-10 degrees error. You can use landmark registration for this. Make sure to harden the transform on the images before you start the automatic registration.

2 Likes

Your comments are amazing Andras, thank you for your time.

I wonder if it’s possible to change the sequence of slices so that when the registration puts the images together the axial view would also match up? for example if the axial view now shows me 159th slide when I fit the image to the window, I would like it to show me the 39th slide first on top.

Also trying other methods to be able to compare for my thesis, I have a model of the pelvis in the CT image which I would like to register on the MRI image. In the FAQ page of registration mentions that “You can run surface and image registrations separately and then combine the transforms”. I’m not sure if I understand correctly! does this mean first to make a model out of the MRI image (which I found not easy) and do the surface registration with the CT model. Second do the registration between CT and MRI images and finally combine the transform of these two steps ?

Slicer does not rely on order of slices, it only matters where the slices are mapped in the physical space (using IJKToRAS transform). If you want to make sure that two volumes have the same geometry (same IJK voxel is located at the same physical RAS position) then you can use “Resample scalar/vector/DWI volume” module and use one volume as reference to resample the other volume.

Bone segmentation on MRI is hard, so probably you don’t want to do surface registration.

1 Like

Greetings,

I applied gradient anisotropic diffusion to both CT and MRI of one of the patients and I got the perfect automatic registration via Elastix for when MRI was the fixed image and CT moving. I inverted the transform and applied manually to CT and got the perfect registration however when I do this with Elastix on fixed CT I don’t get the right transform. What could be the reason for this and is there a way to tune it?

As gradient anisotropic diffusion was successful for automatic registration I would like to use fuzzy edge detection on CT and MRIs to be able to help other registrations that Elastix doesn’t work. For that I need to do the edge detection on the individual slices in Matlab but looking at the MatlabBridge tutorial it uses voxels in the matlab file for further codings. I’m confused on how to get to pixels(on individual slices) for edge detection and again back to voxel for slicer to view the images. I appreciate if you can guide me on this. Thank you.

There could be many reasons. Asymmetric extent (one image is larger than the other), number of samples, voxel size, etc.

In general, you need both the forward and inverse transform, so it does not matter what direction you compute. If image resampling time is an issue (resampling an image takes longer time if the inverse transform needs to be computed) then you can precompute and store the inverse transform in a grid transform.

I would not recommend applying any additional preprocessing, unless it is absolutely unavoidable. It makes the registration time longer, introduces several new variables and overall increases complexity of the algorithm and so the uncertainty of the end result.

1 Like