[Insight-users] Problems with optimizer in DeformableRegistration4.c++
motes motes
mort.motes at gmail.com
Sun Jul 12 04:07:20 EDT 2009
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/bb2243c3/attachment.htm>
More information about the Insight-users
mailing list