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

Martin Kavec kavec at messi.uku.fi
Thu Nov 25 10:57:13 EST 2004


Hi Luis,

thanks for your message. I have gone slower and carefully than the first time 
and here is where I got.

The registration works if I replace MI metric by the NMI. I can monitor the 
metric with an itkCommand and the images register relatively well. However, 
if I replace a Quartenian...Optimizer by OnePlusOne, the registration throws 
an exception during the first iteration. As you suggest below, it seems that 
the problem may be in the Optimizer initialization. I use the same epsilon 
and diameter values as in the ImageRegistration14.cxx, since the example uses 
the same metric and optimizer as I do. I have attached the the source code 
and would appreciate a lot if you could have a look at it, where the problem 
could be.

Thanks a lot for help.

Martin

On Tuesday 23 November 2004 00:36, Luis Ibanez wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CommandIterationUpdate.h
Type: text/x-chdr
Size: 1664 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20041125/5ae3c005/CommandIterationUpdate-0001.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MIMRegistrator.h
Type: text/x-chdr
Size: 7814 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20041125/5ae3c005/MIMRegistrator-0001.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MIMRegistrator.txx
Type: text/x-c++src
Size: 6452 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20041125/5ae3c005/MIMRegistrator-0001.cc


More information about the Insight-users mailing list