[Insight-users] Problems with MultiResMiRegistration

Luis Ibanez luis.ibanez at kitware.com
Mon Dec 20 17:55:51 EST 2004



Hi Jose,


You are right,
The QuaternionRigidTransformGradientDescentOptimizer
is running up to exhausting all the allowed iterations.



You have several options here:


A) Replace this optimizer with the
    VersorRigid3DTransformOptimizer

    and replace the transform with the
    VersorRigid3DTransform

    In this optimizer you have the gradient
    magnitude and the step length as stopping
    criteria.

    Note that in this case you will have to
    make significant changes to the applications
    (which can be a good learning experience).  :-)



B) You can add your own stopping criteria to
    the optimizer. This can be done in two ways

     1- editing your local copy of the file

     Insight/Code/Numerics/
  itkQuaternionRigidTransformGradientDescentOptimizer.cxx

     and adding a stopping criterion to the
     method AdvanceOneStep().  The typical
     criterion could be a combination of the
     quaternion magnitude and the translation
     vector magnitude.


     2- you could create your new optimizer by
     deriving from the
itkQuaternionRigidTransformGradientDescentOptimizer

     and again adding the stopping criterion to the
     AdvanceOneStep() method.




Please let us know if you have any further questions,



     Thanks



        Luis



-----------------------
José Ángel Tavira wrote:

> Hi Luis,
> 
> thank you very much for your explanation. I have been searching the trying
> to find out the QuaternionRigidTransformGradientDescentOptimizer's
> convergence criteria, but I have read this portion of text in the
> corresponding file (QuaternionRigidTransformGradientDescentOptimizer.h):
> 
> * QuaternionRigidTransformGradientDescentOptimizer is an extension to the
>  * simple gradient descent optimizer implmented in GradientDescentOptimizer.
>  * At each iteration the current position is updated according to
>  *
>  * p(n+1) = p(n) + learningRate * d f(p(n)) / d p(n)
>  *
>  * \f[
>  *        p_{n+1} = p_n
>  *                + \mbox{learningRate}
>  *                \, \frac{\partial f(p_n) }{\partial p_n}
>  * \f]
>  *
>  * The learning rate is a fixed scalar defined via SetLearningRate().
>  * The optimizer steps through a user defined number of iterations;
>  * no convergence checking is done.
> 
> 
> So, if  "no convergence checking is done" in this optimizer, this
> registration method can never work, can't it?
> Do I have to implement a convergence checking therefore?
> 
> 
> Thank you very much for your attention.
> 
> 
> José.
> 
> 
> 
> 
> 
> 
> 
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "José Ángel Tavira" <jat at navimetric.com>
> Cc: "ITK" <insight-users at itk.org>
> Sent: Friday, December 17, 2004 11:36 PM
> Subject: Re: [Insight-users] Problems with MultiResMiRegistration
> 
> 
> 
>>Hi Jose,
>>
>>Thanks for the detailed description of your problem.
>>
>>When you are fine tunning the parameters of a Multi-Resolution
>>registration, you must solve one level at a time.
>>
>>Attempting to tune the parameters of all the levels at the same
>>time is very time consuming and almost impossible to do right
>>because you will not see the intermediate results from the previous
>>resolution level.
>>
>>
>>The rule in multi-Resolution is quite simple:
>>
>>
>>    NEVER GO TO THE NEXT HIGHER RESOLUTION LEVEL
>>    UNLESS YOU HAVE COMPLETELY REGISTERED THE
>>    CURRENT LEVEL.
>>
>>
>>If your images at not registered at the current level,
>>it is very unlikely that the next higher resolution
>>level will do any better.
>>
>>
>>
>>What you want to do, then is to select just one pyramid level and
>>define the subsample factor as the maximum that you are planning
>>to use for the full schedule.
>>
>>In your case, you should start with the subsample factor of (4x4x1).
>>Use first this single resolution level and modify the parameters of
>>the optimiazer and the parameters scaling until you get full convergence
>>and you are satisfied with the registration at that level. Note for
>>example, that you have to make sure that the optimizer stopped because
>>it reached one of the convergence criteria, and not because it ran out
>>of iterations.
>>
>>
>>In order to fine tune the parameters you will find useful to attach a
>>Command/Observer to the optimizer, so you can see the trace of the
>>optimization process. You will find multiple examples in the ITK
>>Software Guide on how to add Observers to the optimizer.
>>
>>
>>Please let us know if you have further questions.
>>
>>
>>    Thanks
>>
>>
>>      Luis
>>
>>
>>-------------------------
>>José Ángel Tavira wrote:
>>
>>
>>>Hi everyone
>>>
>>>I am using the MultiResMiRegistration framework in order to registrate 2
>>>medical studies (a CT study and a MR study).
>>>
>>>The InsightApplications software offers an application using these
>>>components.
>>>
>>> * In particular, it uses the ITK registration framework with
>>> * the following combination of components:
>>>
>>> *   - MutualInformationImageToImageMetric
>>> *   - QuaternionRigidTransform
>>> *   - QuaternionRigidTransformGradientDescentOptimizer
>>> *   - LinearInterpolateImageFunction
>>>
>>>This application has the next parameters to configure:
>>>
>>>    moving image initial shrink factors
>>>    fixed image initial shrink factors
>>>    optimizer number of iterations
>>>    number of multiresolution levels
>>>    learning rates per level
>>>    translation scales
>>>
>>>And, finally, these are the set of values I use for them:
>>>
>>>    moving image initial shrink factors       (4,4,1)
>>>    fixed image initial shrink factors          (4,4,1)
>>>    optimizer number of iterations             (2500)
>>>    number of multiresolution levels          3,4 or 5
>>>    learning rates per level                       1e-03 1e-04 1e-05
>>>1e-06 1e-07, ...
>>>    translation scales                              around 320 (1 or 2
>>>orders lower and higher)
>>>
>>>    The set of studies I'm working with, has the next parameters (or
>>>similar):
>>>
>>>    CT Dimensions: 512 x 512 x 105 (x,y,number of slices)
>>>    CT Resolutions: 0.7 x 0.7 x 1.25 (x,y,z)
>>>
>>>   MR Dimensions: 256 x 256 x 120 (x,y,number of slices)
>>>   MR Resolutions: 0.9 x 0.9 x 1.4 (x,y,z)
>>>
>>>
>>>    I have made a lot of combinatios with the registration values
>>>described above but the registration still remains very, very inexact!!
>>>
>>>Could anyone help me?  Do I have to configure any other parameters
>>>inside the ITK code?
>>>
>>>
>>>Thank you very much in advance.
>>>
>>>
>>>
>>>José.
>>>
>>>
>>>
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>>
>>
>>
> 
> 
> 






More information about the Insight-users mailing list