[Insight-users] Using Example - MutualInformationEuler2DRegistration..

Luis Ibanez luis . ibanez at kitware . com
Wed, 14 Aug 2002 13:34:15 -0400


Hi Venkat,

Adjusting parameters for registration is not always trivial.

Please note that in this particular example/application you
are not tunning parameters related with the MutualInformation
metric.

Parameters related with the MutualInformation metric are:

1) Number of random samples taken from the fixed image pixels.
2) The value of Sigma assumed for estimating the statistical
    joint distribution of gray levels.

These values are pretty much fixed internally in this application.


The parameters you are interacting with at the GUI level are
related with the spatial Transform and the Optimizer.

To be more specific:

1) Number of iterations = iterations of the GradientDescentOptimizer
2) LearnigRate = multip.factor for computing step size in the optimizer
3) RotationScale = Spatial Transformation (regulate how much do you
    allow the moving image to rotate in its effort for finding a matching
    position over the fixed image.
4) TranslationScale = Spatial Transform (the role is similar to the
    previous one: it regulates how much translation is allowed).


Here are some hints about how to proceed with these parameters.
Unfortunately there are not strict rules about how to select the
parameters in an optimal way...


1) Start with low learning rates and balance them with number of
    iterations. The learning rate regulates how big are the steps
    taken by the optimizer in the search space. Small steps will
    require more iterations to get to the same place.

    A High learning rate will easily make your optimization unstable.
    If that happens, typically the moving image will be mapped out
    of the scope of the fixed image and you will get messages like:
    "all the pixels are mapped outside the image".

2) Start with low values for translation scales. That will result
    in translations being resolved first.  This is valid under the
    assumption that your image is missregisterd more by translation
    than by rotation (which is usually the case since most CT/MRI
    acquisition devices don't left you much room to rotate inside
    the thight tunnel   :-)

3) Try first reduced versions of your images. This particular example
    is not taking advantage of the ITK Multiresolution Framework, so
    reducing by half your image will make your tests go 4 times faster.

4) Follow the values displayed on the "Iterations Feedback" window.
    These are the parameters of the current spatial transformation.
    They will indicate how the moving image is being mapped on your
    fixed image and will give you an idea of how good the current
    learning rate and Rotation/Translation scales are.

---------

About the problems:

1) The error message when saving the images this is actually a bug.
    It can be fixed by adding the following line in the file:
    RegisterApplication.cxx: after line 10

    m_RegisteredImageWriter->SetImageIO( itk::PNGImageIO::New() );

    (this has been fixed in the current cvs version).


2) The values of the transform are actually displayed on the
    text box at the bottom of the GUI when the registration
    process is completed.

3) The application as it is now, will not be able to load a raw
    image.  It loads both PNG and 2D MetaImage files. The reason
    is just the fact that for reading raw you will have to add to
    the GUI the options for specifying image dimensions and spacing.

    However, it is quite easy to create a MetaImage file is you
    already have a RAW image. You just need to create an extra
    text file which contains such information.

    Please take a look at  Insight/Examples/MetaImageImporter you
    will find a small application that helps you create MetaImages
    from your data.


Please let us know if you encounter furter problems.


Thanks

Luis


==========================================


Venkat Anand wrote:
> Jisung and Luis,
> 
> Thanks for your suggestions - i was able to get the registration
> working for the images i mentioned earlier after some effort spent in
> playing around with the parameters, i increased the iterations and the 
> translation scale. (A black filled
> circle on a white background at a offset position in the moving
> image as  compared to the original image).
> 
> However this kind of parameter adjustment was feasible coz
> i know the end results, are there guidelines for choosing the parameters
> for  registration by mutual information..?
> 
> 
> Also I have a few more questions regarding the particular example
> (MutualInformationEuler2DRegistration):
> 
> 1. I wanted to save the registered image using the "Save Registered
> Image" option, but i get the message saying "Problems saving file format".
> I have been using PNG format for all my images.
> 
> 2. Also i want to take a look at the tranform matrix (I am using
> RigidTransform)..is there a way to print this out?
> 
> 3. Does this application work with raw image formats too?
> 
> thanks
> Venkat.
> 
> 
> 
>