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

motes motes mort.motes at gmail.com
Sun Jul 12 16:34:48 EDT 2009


I have updated the optimizer parameters to match the deformableTransform
(since that is what is used in example4):

  //ParametersType parameters(numberOfParameters);
  OptimizerScalesType optimizerScales(numberOfBSplineParameters);
  optimizerScales.Fill(1.0);
  optimizer->SetScales(optimizerScales);
  ParametersType parameters(numberOfBSplineParameters);
  parameters.Fill(0.0);
  transform->SetParameters(parameters);
  registration->SetInitialTransformParameters( transform->GetParameters() );
  std::cout << "Intial Parameters = " << std::endl;
  std::cout << transform->GetParameters() << std::endl;


I now get a very small change in the registered image. I assume that the
deformation I apply to get the moving image is to drastic. Is  it not
possible to do a more accurate registration with the following fixed and
moving images:

Fixed: http://img15.imageshack.us/img15/4683/lenad.jpg

Moving: http://img15.imageshack.us/img15/4364/lenadeform1.jpg



On Sun, Jul 12, 2009 at 10: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?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090712/d766ade8/attachment.htm>


More information about the Insight-users mailing list