[Insight-users] NMI registration with 1+1 optimizer

Luis Ibanez luis.ibanez at kitware.com
Mon Nov 22 18:36:55 EST 2004


Hi Martin,

This is a very common exception.

It means that your optimizer if moving too far too fast.

The message indicates that the current transform is
mapping the moving image away from the fixed image,
in such a way that the overlap between the two is
too small or even inexistent.


The typical reasons for entering in that situation are


   A) poor initialization of your transform

   B) setting the optimizer to give steps that are too large.

   C) inapropriate scaling of the transform parameters


The way to figure out which one of this errors is
the one happening in your case, is to add an Observer
to the optimizer in the registration, and print out
the values of the transform at each iteration.

This will allow you to see if the initial transform
has decent values, and then check whether those values
evolve smoothly or if they start changing wildly.

In the case of the 1+1 optimizer you have parameters that
define the width of the distribution for generating random
samples at each iteration. It is likely that you are being
too relaxed on those values and letting the optimizer select
transform parameters that change too fast.

If you are in case (C) (which is also quite a common mistake),
you are probably mixing the dynamic range of rotations with
the one for translations. Note that rotations are measured
in radians, so a variation of "1" is *very large*, while
for translations, a variation or "1" is relatively small.




You will find many examples on the ITK Software Guide

           http://www.itk.org/ItkSoftwareGuide.pdf

on how to set up observers for registration.



Please let us know what you find.



    Thanks,



       Luis



---------------------
Martin Kavec wrote:

> Hello everybody,
> 
> I have used MultiResMIRegistration project from InsightApplications-1.8.0 as a 
> base and tried to modify it to use normalized mutual information together 
> with OnePlusOne optimizer. Also, I carefully looked at the 
> ImageRegistration14.cxx from ITK Examples/Registration, since it uses the 
> mentioned metric and optimizer.
> 
> The attached files are the only files I have modified and they compile fine on 
> my system (gcc 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, 
> pie-8.7.6). However, the registration throws following exception on the 0 
> level:
> 
> Caught an exception:
> 
> itk::ExceptionObject (0x8110dd8)
> Location: "Unknown"
> File: /opt/include/InsightToolkit/Algorithms/itkHistogramImageToImageMetric.txx
> Line: 255
> Description: itk::ERROR: 
> NormalizedMutualInformationHistogramImageToImageMetric(0x8101410): All the 
> points mapped to outside of the moving image
> 
> I am not sure, if I haven't done any fatal errors, while I edited the files. I 
> searched for help ITKSoftwareGiude, ITK/VTK mailing lists and all the 
> Registration/Examples. I am sending any detailes of the input volumes because 
> I guess, the problem is still in the attached code.
> 
> I would very much appreciate any help. Thanks in advance.
> 
> Martin
> 
>





More information about the Insight-users mailing list