[Insight-users] Problems with optimizer in DeformableRegistration4.c++

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 14 12:26:29 EDT 2009


Hi Motes,

Why are you introducing the following code ?


OptimizerScalesType optimizerScales(transform->
>
> GetNumberOfParameters() );

  const double translationScale = 1.0 / 1000.0;
  optimizerScales[0] = 1.0;
  optimizerScales[1] = 1.0;
  optimizerScales[2] = 1.0;
  optimizerScales[3] = translationScale;
  optimizerScales[4] = translationScale;
  optimizerScales[5] = translationScale;
  optimizer->SetScales( optimizerScales );


You don't need this at all, because the Transform
is a BSpline transform. All parameters should have
about the same dynamic range.


Please remove those lines.


   Thanks


       Luis



-----------------------------------------------------------------
On Sun, Jul 12, 2009 at 4:07 AM, motes motes <mort.motes at gmail.com> wrote:

> I get an error when I run DeformableRegistration4.c++ related to the
> itk::LBFGSOptimizer optimizer.
>
> As Luis recommended I have therefore changed the optimizer to
> itk::RegularStepGradientDescentOptimizer. I have only changed the following
> optimizer related code in the example:
>
> From:
>
> // Old itk::LBFGSOptimizer settings
> // optimizer->SetGradientConvergenceTolerance( 0.05 );
> // optimizer->SetLineSearchAccuracy( 0.9 );
> // optimizer->SetDefaultStepLength( 1.5 );
> // optimizer->TraceOn();
> // optimizer->SetMaximumNumberOfFunctionEvaluations( 1000 );
>
> To (based on the settings to the itk::RegularStepGradientDescentOptimizer
> from DeformableRegistration15.c++ ):
>
>   OptimizerScalesType optimizerScales(transform->GetNumberOfParameters() );
>   const double translationScale = 1.0 / 1000.0;
>   optimizerScales[0] = 1.0;
>   optimizerScales[1] = 1.0;
>   optimizerScales[2] = 1.0;
>   optimizerScales[3] = translationScale;
>   optimizerScales[4] = translationScale;
>   optimizerScales[5] = translationScale;
>   optimizer->SetScales( optimizerScales );
>   optimizer->SetMaximumStepLength( 0.2000  );
>   optimizer->SetMinimumStepLength( 0.0001 );
>   optimizer->SetNumberOfIterations( 200 );
>
>
> But when I run it on the following fixed and moving images:
>
> Fixed: http://img15.imageshack.us/img15/4683/lenad.jpg
>
> Moving: http://img15.imageshack.us/img15/4364/lenadeform1.jpg
>
> the result is completely identical to the moving image:
>
> Result (registered image):
> http://img189.imageshack.us/img189/3148/lenaout.png
>
> Any ideas on what goes wrong? Is it related to the input images or do I
> need to tweak the new optimizer further?
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090714/94d88808/attachment.htm>


More information about the Insight-users mailing list