Mutual Information Metric in Registration

Dear All,

If I do a registration between two equal/same images. And the result be a perfect match. What will be the final value of the metric? With Mutual Information metric.


Luís Gonçalves

Hello @Luis_Carlos_Carneiro,

The values of mutual information are in [0,\infty), and in the ITK optimization they are negated so that we always minimize. Bottom line, there is no specific value that is always associated with correct alignment, it is the minimum for the specific image pair being registered.

See please the following metric evolution through convergence. Seems that is the maximum found and it is zero. If it is negated is the minimum found and it is zero. Both targets are zero not either infinity or -infinity. Seems that the target is zero or no information (mutual information). That is because two equal images have no added information, I suppose.

Hello @Luis_Carlos_Carneiro,

Based on the graph I can see that you are using a three level pyramid. The change in MI between the levels is primarily due to the change in resolution, has nothing to do with the optimization. In any case it appears that nothing is happening in terms of registration. The optimizer is trying to minimize the MI, but unsuccessfully (fails after very few iterations).

I would suggest working with a single level, and modifying the optimizer parameters till it is clear that it is starting to converge, then you can go back to a multi-resolution framework.

See please the print output of the registration. Can you infer something?

interactive(children=(IntSlider(value=134, description=‘fixed_image_z’, max=268), IntSlider(value=141, description=‘moving_image_z’, max=282), Output()), _dom_classes=(‘widget-interact’,))
interactive(children=(IntSlider(value=134, description=‘image_z’, max=268), FloatSlider(value=0.5, description=‘alpha’, max=1.0, step=0.05), Output()), _dom_classes=(‘widget-interact’,))
Final metric value: -0.004719050630487881
Optimizer’s stopping condition, GradientDescentOptimizerv4Template: Convergence checker passed at iteration 9.
interactive(children=(IntSlider(value=134, description=‘image_z’, max=268), FloatSlider(value=0.5, description=‘alpha’, max=1.0, step=0.05), Output()), _dom_classes=(‘widget-interact’,))

And the graph above is similar of the example. But I think you are right. The stop metric in my case is too low in modulus.

@zivy For several years, I accepted that registration requires parameter tuning for each new registration task (new kind of images, new organ, etc.). But then I started to use Elastix (and their default linear+bspline preset) and it just worked for all kind of registration tasks I threw at it, without any parameter tuning (they were all 3D to 3D, clinical CT or MRI images, cropped to approximately to the same region; but a variety of anatomies, and often between different patients and different imaging modalities). This proves that it is possible to create truly generic registration methods that “just work” out of the box for most cases. It would be great if stock ITK registration classes would offer this, too. Maybe it is just a matter of finding a good generic parameter set.

This is a registration of two similar images (not equal) with single tone (binary , 255 and zero) each. Each is a surface of a face. It gives final low mutual information because of that, no?
You can see in the output of the registration that it converges at iteration 9.
Like in example:

Hello @lassoan,

I’m sure there is a basic setup that often works, and people can readily use the default elastix parameter settings in ITK/SimpleITK, but the existence of the model zoo indicates that this “default setting” didn’t really work for many of the registration tasks that the developers of Elastix worked on. Bottom line, I don’t think that we have a silver bullet in terms of settings, it is problem specific.

Hello @Luis_Carlos_Carneiro,

OK, know I have a better sense of the problem. You are trying to register two binary volumes with sharp edges. This likely has a very narrow convergence range when using the binary volumes directly.

Instead of the original images, use their signed distance maps, sitk.SignedMaurerDistanceMap(binary_image, useImageSpacing=True, backgroundValue=0). Register the two distance maps and apply the resulting transformation to the original image.

1 Like