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

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 14 12:31:40 EDT 2009


Hi motes,

If the deformation is not getting far enough,
you may have to:

1) Increase the number of iterations

                   and/or

2) Start with a larger SetMaximumStepLenght()

                  and/or

3) Use a higher value in the SetRelaxationFactor()
    the default is 0.5, you could try 0.9.



Think that the value of the Step length is *projected*
among all the Dimension of the BSpline parameter
space. Therefore, the value that you set may have to
be hundreds of times larger than the deformation that
you expect to obtain.


     Regards,


          Luis



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

> 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?
>>
>>
>>
>
> _____________________________________
> 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/7e9093e5/attachment.htm>


More information about the Insight-users mailing list