[Insight-users] DeformableRegistration7 and stopping criteria

Luis Ibanez luis.ibanez at kitware.com
Sun Sep 25 13:06:57 EDT 2005


Hi Kris,


Please add the following line to the optimizer
before you invoke "StartOptimization":


           optimizer->DebugOn();


with this line, the optimizer will print internal
information that will help you to figure out what
are the criteria reached for convergence.

For details on the possibilities, please look at
the code of the itkLBFGSBOptimizer in


     Insight/Code/Numerics/
              itkLBFGSBOptimizer.cxx


in particular to lines 300-338. The lines with
itkDebugMacro() are the ones that will generate
messages for you.


If you want to switch for a normalized metric,
a good option is the Normalized correlation metric,
which is appropriate for same-modality images.



   Regards,



      Luis



-------------------------
Kris Thielemans wrote:
> Dear all
> 
> I'm trying to run DeformableRegistration7 on some of my data. This uses the
> LBFGSBOptimizer for a BSplineDeformableTransform using a
> MeanSquaresImageToImageMetric.
> 
> I have a problem with the stopping criteria used in the file. I think this
> is related to the usage of the MeanSquaresImageToImageMetric which seems to
> have values which are very much image dependent. I think it's the
> appropriate metric for my problem (registering multiple gates of the same
> patient on the same modality) but am not sure how to use it. More detail
> follows.
> 
> 
> The example program sets
> 
>   optimizer->SetCostFunctionConvergenceFactor( 1e+7 ); // KT original 1e+12
> which according to the LBFGSBOptimizer  doc is low accuracy
>   optimizer->SetProjectedGradientTolerance( .001 );// KT original 1.0
>   optimizer->SetMaximumNumberOfIterations( 10 ); // KT original 500
>   optimizer->SetMaximumNumberOfEvaluations( 500 );
>   optimizer->SetMaximumNumberOfCorrections( 5 );
> 
> I find that I have to tune these variables to the particular data-set I'm
> using. For example, if I give as input images with 26 slices of the whole 3D
> images, the above parameters 'work'. That is, the program runs for 10
> iterations and outputs a very reasonable match. Now I use the whole data-set
> (211 slices) and the program stops after the first iteration (with final
> deformation parameters equal to the identity), presumably because one of the
> above criteria has already been met. (I had the same with the 26 slice data
> if I used the original settings).
> 
> I'm playing around with SetCostFunctionConvergenceFactor (setting 1e+5) and
> decreasing the SetProjectedGradientTolerance to smaller numbers, but still
> have the same problem.
> 
> (For your info, right now, I'm using NCAT simulated data, which consist
> essentially of a bunch uniform regions. This might mean that the metric is
> not so suitable after all. Later on I'll go to real data).
> 
> No doubt, there will be some values for which the program will actually do
> something. Question is which ones... It seems that to make this slightly
> more robust, these settings will have to be computed somehow from the
> images. Or maybe I should be using some normalised metric.
> 
> Any suggestions?
> 
> Many thanks
> 
> Kris Thielemans
> Hammersmith Imanet Ltd
> part of GE Healthcare
> London, UK
> 
> _______________________________________________
> 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