[Insight-users] Re: BSpline Deformable Registration Error

Popa Teo popateodoru at yahoo.com
Thu Aug 31 14:29:44 EDT 2006


Hi,
   
  In Bspline registration the use of vnl_lbfgs optimizer  is tricky to use
   
  I would recomend to swich it to steepest descent because is much more predictible.
   
  But anyway here are the IFLAG values
   
  /*              IFLAG=-1  The line search routine MCSRCH failed. The */
 /*                        parameter INFO provides more detailed information */
 /*                        (see also the documentation of MCSRCH): */
 
1 /*                       INFO = 0  IMPROPER INPUT PARAMETERS. */
 
 /*                       INFO = 2  RELATIVE WIDTH OF THE INTERVAL OF */
 /*                                 UNCERTAINTY IS AT MOST XTOL. */
 
 /*                       INFO = 3  MORE THAN 20 FUNCTION EVALUATIONS WERE */
 /*                                 REQUIRED AT THE PRESENT ITERATION. */
 
 /*                       INFO = 4  THE STEP IS TOO SMALL. */
 
 /*                       INFO = 5  THE STEP IS TOO LARGE. */
 
 /*                       INFO = 6  ROUNDING ERRORS PREVENT FURTHER ROGRESS.*/
 /*                                 THERE MAY NOT BE A STEP WHICH SATISFIES */
 /*                                 THE SUFFICIENT DECREASE AND CURVATURE */
 /*                                 CONDITIONS. TOLERANCES MAY BE TOO SMALL.  */
 /*             IFLAG=-2  The i-th diagonal element of the diagonal inverse */
 /*                       Hessian approximation, given in DIAG, is not */
 /*                       positive. */
 
 /*             IFLAG=-3  Improper input parameters for LBFGS (N or M are */
 /*                       not positive). */

You can observe that steplengh by watching
  *************************************************
   I   NFN    FUNC        GNORM       STEPLENGTH
   
  where STEPLENGHT=is determined at each iteration by means of the 
 line search routine MCVSRCH which I dont think you can control it, only the 
  step size stopping tolerance
   
  Useful links:
  Numerical receipes
  http://www.library.cornell.edu/nr/bookcpdf/c10-7.pdf
   
  and Wiki
  http://en.wikipedia.org/wiki/BFGS_method
   
  Also I recomend you can play with it first to see how actualy optimizer work here:
   
  http://www.cse.uiuc.edu/eot/modules/optimization/BFGS/
   
   
   
  Teo
  
Matt Robert <matt.roberto at googlemail.com> wrote:
  Another error I am getting is 

IFLAG= -1. LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN
 OF LINE SEARCH: INFO=4 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE  INCORRECT OR
INCORRECT TOLERANCESvnl_lbfgs: ** EEEK **
ExceptionObject caught !

  On 8/25/06, Matt Robert <matt.roberto at googlemail.com> wrote:    Hi,

I used example DeformableRegistration4 to register two images. It works perfectly well and gives good results while reading images from disk. 

I tried extracting two slices from two volumes and used the code given in DeformableRegistration4 to register them but it gives the following error. All the parameter and initialization values are same as in example. 

If I save these two slices on disk and use the example, then it works. 

Initial Parameters =
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Starting Registration
 F = 0.00143433, GNORM = 0
*************************************************
   I   NFN    FUNC        GNORM       STEPLENGTH
THE SEARCH DIRECTION IS NOT A DESCENT DIRECTIONIFLAG= -1. LINE SEARCH FAILED. SE
E DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN  OF LINE SEARCH: INFO=0 POSSIBLE
CAUSES: FUNCTION OR GRADIENT ARE  INCORRECT OR INCORRECT TOLERANCESvnl_lbfgs: **
 EEEK **
ExceptionObject caught !

itk::ExceptionObject (0137F814)
Location: "unknown"
File: \itksrc\Code\Numerics\itkLBFGSOpt
imizer.cxx
Line: 265
Description: itk::ERROR: LBFGSOptimizer(01905DD0): Error occured in optimization

In VS 6.0, I used quick watch and it showed that in fixed and moving images, the m_Direction field was different for both images, one was [(1 , 0),(1,0)] the other was [(1,0),(0,1)]. To resolve this problem I created two empty images and copied data from previous ones using iterators, but still same error. 

  
Matt




_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060831/91104c9a/attachment.htm


More information about the Insight-users mailing list