"This stuff is hard!" resources to start learning about registration

Hi everyone,

I have been playing around with “turning the knobs” for registration for some time now, but I feel most of the time it is still a black-box to me. I wonder if I lack a good foundation for image registration. I was wondering if there are any good books you could recommend on the subject? Or is it best to try and wade through all the registration papers?

In terms of ITK related resources, I have already found these recommended in another post Image registration metric derivative

I suppose it does not help that I am trying to register optically cleared brains imaged with light sheet microscopy (contrast of internal structures seems worse than that of regular human MRI/CT which I assume ITK registration was optimised for). But this stuff is definitely hard - well done to those of you who developed ITK implementation of this!

Cheers,
Vytas

1 Like

For many years, I thought registration is hard. Initially, for each particular registration problem I had to spend weeks to experiment with various ITK registration methods, tune registration parameters, analyze metrics, etc. Over time, I got better and usually could find acceptable parameter sets in about a day.

Then, I tried Elastix library (based on ITK, but it adds several new metrics and optimization schemes) and, shockingly, it just worked! For reasonable problems it always provided reasonable results, with default parameters, without any tuning.

So, in addition to experiment with built-in ITK registration methods, I would also recommend to give Elastix and other libraries a try. You can also find parameter sets for common registration problems that you can start from.

For example, there are many presets for BRAINS library (thin wrapper over ITK registration methods, with similar issues) in 3D Slicer’s Registration case library and there are many presets for Elastix (usually the default one works the best for me).

For quick experimentation, you can use 3D Slicer: both BRAINS and Elastix toolkits are available with a nice graphical user interface.

2 Likes

Thank you for your reply. It is rather embarrassing for me to admit, but I did in fact start with Elastix. Provided the data is of reasonable quality (no damage to the outer surface), I can normally get a good large structure registration (as you said, there are many parameter sets available to play with). However, I was never satisfied with internal structure matching, particularly the ventricles (but again, this is rodent brain imaged in light sheet microscopy, which has it’s own issues such as shadow stripes (due to illumination) and air bubbles (due to optical clearing of the samples). I also experimented with DRAMMS (which seemed promising judging from the publications for matching brains with significantly different ventricles). However, that yielded disappointing results and Elastix was much better. But I digress.

On one hand, I suppose data quality is rather crucial for all of these registration algorithms (and it seems to me that MRI/CT typically has good care contrast), on the other hand, people seem to successfully register diseased brains (e.g. with a tumour) with healthy brain images. However, it is not clear to me how are they able to achieve that. I guess the question I need to find an answer is what is the mininum similarity between brain volumes for a particular registration algorithm/metric to be successful. Apologies for the monologue!

1 Like

We use Elastix extensively here and are quite pleased with that, but as you say there are many parameters and no real manual on how to get the best result, so it takes a bit of experimentation. I’m not sure about promoting software in this forum but there are free software out there that makes it easy to test different registration strategies easily.

Thanks Mattias. Can you elaborate on “We use Elastix extensively here and are quite pleased” i.e. are you registering human brains?

Regarding software promotion, I don’t think there is anything in the guidelines for this forum about that https://discourse.itk.org/guidelines

It’s used mostly in research related to radiotherapy and MR, so usually it is head and neck (including brain) and the pelvic area. One researcher here is registering pathology microscopic images of prostates to the corresponding MR images.

We use a software developed here called MICE Toolkit, the ‘lite’ version is free and include things like Elastix registration among many other things. It’s a graphical interface to define your image processing flow, so you can design something like this.

Currently the Elastix node supports stuff like multi metric registrations, rigidity penalty maps for non-rigid registrations and the basic stuff. There is a bit of a learning curve to get started but we have a couple of tutorials to get you started here.

If you want to try it and need nifti support you need the latest beta of the software, so let me know if that’s the case.

1 Like

For fine tuning the registration results, you can experiment with cropping the images and use masks, but you might need to use some of the advanced techniques. These are extensively documented in Elastix papers and implementation and examples are all available in the parameter file database. Skim through the papers and see if you find some that solve similar issues that you have. You may also contact Elastix community to get help on specific issues that you have. Include pictures of what the registration can do now, and mark the places where registration result is not satisfactory.

2 Likes

Welcome to the ITK community, Vytas!

One concept that is important to grasp for successful registration is the relationship between registration and segmentation. That is, registration relies on finding the corresponding structures, but segmentation is needed to identify the structures. And, to segment structures in an image, it can be useful to identify their correspondance relative to a reference, e.g. an atlas. Interesting reading is segmentation with the Mumford-Shah functional and related papers.

A practical consequence is that it is often helpful to reduce noise and artifacts as a pre-processing step before registration: we want to find correspondance only between structures that have a correspondance.

It should be helpful to try to filter out these artifacts. Luckily, ITK contains many helpful tools for this task, too :slight_smile:.

2 Likes

I can also recommend using Simple Elastix (http://simpleelastix.github.io/) which merges the functionality of Elastix into Simple ITK, thus giving you access to both Elastix and ITK functions within for example Python.

1 Like

Thanks everyone for your replies with suggestions!

@mattias It was useful reading the manual, there were some tips that I have not seen before.

@lassoan I must have been doing cropping/masking wrong as it would always make things worse. But I heard this suggestion quite a few times now, so will have to try again better.

@grothausmann.roman I did take a look at that (particularly in order to test groupwise registration) but it seems that documentation is still in progress or the author assumes knowledge of SimpleITK. For instance, it is not explained how would one load a parameter.txt file that you would normally use with command line Elastix. It seems like a promising project though!

The docs have not been updated for some time. Best is to look what is defined in sitkElastixImageFilter.h
Where you can find ReadParameterFile


which I also seemed to have had problmes in finding (https://github.com/romangrothausmann/elastix_scripts/blob/451e1d4cb60e706851cc65644d15851a1264569e/recRegStack.py#L125). It is best to post suggestion, questions, etc on GH: https://github.com/SuperElastix/SimpleElastix/issues/