[Insight-users] LBFGS with Centered2DTransform: All points mapped to outside of the moving image

Felix Bollenbeck Felix.Bollenbeck at iff.fraunhofer.de
Thu Oct 8 08:43:58 EDT 2009


Dear Luis, dear users

thanks for your hint.

The problems seems to be comming from the scales - the floating image is 
indeed far far away (see below). 
        I have done some reading on the quasi newton methods  maths, but 
completely forgot thinking about parameter scaling, so I had kept the 
scales from the gradientDescent code.


Using uniform 1.0 scaling avoids the first error, but then stepsizes are 
2-3 maginitudes to small laeving the metric value almost unchanged, over 
the iterations.

Does the LBFGS class have a different interface for the scaling parameters 

        and where would I look best for more info on the scale parameters?

Best regards,

        Felix.


Initial =
 Angle (radians)   = 0
 Angle (degrees)   = 0
 Center X      = 111.125
 Center Y      = 116.064
 Translation X = 11.9944
 Translation Y = -8.46667
Number of Pixels=425780
FixedImage schedule: [1, 1]

MovingImage schedule: [1, 1]

-------------------------------------
MultiResolution Level : 0

GetValueAndDerivative [0, 111.125, 116.064, 11.9944, -8.46667]          // 
<====================================

*************************************************
  N=5   NUMBER OF CORRECTIONS=5       INITIAL VALUES F= 15301   GNORM= 
5.16606e+06
*************************************************
   I   NFN    FUNC        GNORM       STEPLENGTH
GetValueAndDerivative [0.000196306, 111.125, 116.064, 9324.5, 17691.2]  // 
<====================================
ExceptionObject caught !

itk::ExceptionObject (0x7f9f10)
// snip 
Description: itk::ERROR: MeanSquaresImageToImageMetric(0x7f2260): All the 
points mapped to outside of the moving image




Luis Ibanez <luis.ibanez at kitware.com> 
Gesendet von: insight-users-bounces at itk.org
06.10.2009 20:42


An
Felix.Bollenbeck at iff.fraunhofer.de
Kopie
insight-users at itk.org
Thema
Re: [Insight-users] LBFGS with Centered2DTransform: All points  mapped to 
outside of the moving image







Hi  Felix,

Thanks for the clear description of the problem.

If the Exception is thrown before printing the first
iteration of the optimizer, it is then likely that the
problem is in the initialization of the transform.

...

Printing out the parameters that are received
by the Metric in its first evaluation will help
answering the question.

Simply add a std::cout in the GetValueAndDerivative()
method, of the Metric that you are using.


   Please let us know what you find,


        Thanks


             Luis


---------------------------------------------------------------
On Wed, Sep 30, 2009 at 9:39 AM,  <Felix.Bollenbeck at iff.fraunhofer.de> 
wrote:
>
> Dear ITK user,
>
> I want to use the LBFGS for centered 2D registration, instead of 
gradient
> descent, hoping for a little speed-up.
>
> I exchanged the optimizer in one of the multi-res examples.
>
> (The regular step gradient optimization works fine. )
>
> The LBFGS version complains though:
>
> "All points mapped to outside of the moving image"
>
> I assume, I have made two possible errors:
>
>
>         1. Scales are not passed correctly to the LBFGS and back, so 
that
> the floating image is indeed way off course
>
>
> and /or
>
>         2. Transform and/or Metric do not deliver derivatives as the
> optimizer expects it, and the registration method assumes that these 
values
> are zero
>
>
>
> The exeception is thrown before any optimizer positions are printed.
>
> Can you point me in the right direction?
>
> Regards,
>
> Felix.
> _____________________________________
> 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
>
>
_____________________________________
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/20091008/e2d039fc/attachment.htm>


More information about the Insight-users mailing list