<div>Hi,</div> <div> </div> <div>In Bspline registration the use of vnl_lbfgs optimizer is tricky to use</div> <div> </div> <div>I would recomend to swich it to steepest descent because is much more predictible.</div> <div> </div> <div>But anyway here are the IFLAG values</div> <div> </div> <div><SPAN class=comment>/* IFLAG=-1 The line search routine MCSRCH failed. The */</SPAN><BR> <SPAN class=comment>/* parameter INFO provides more detailed information */</SPAN><BR> <SPAN class=comment>/* (see also the documentation of MCSRCH): */</SPAN><BR> <BR>1 <SPAN
class=comment>/* INFO = 0 IMPROPER INPUT PARAMETERS. */</SPAN><BR> <BR> <SPAN class=comment>/* INFO = 2 RELATIVE WIDTH OF THE INTERVAL OF */</SPAN><BR> <SPAN class=comment>/* UNCERTAINTY IS AT MOST XTOL. */</SPAN><BR> <BR> <SPAN class=comment>/* INFO = 3 MORE THAN 20 FUNCTION EVALUATIONS WERE */</SPAN><BR> <SPAN
class=comment>/* REQUIRED AT THE PRESENT ITERATION. */</SPAN><BR> <BR> <SPAN class=comment>/* INFO = 4 THE STEP IS TOO SMALL. */</SPAN><BR> <BR> <SPAN class=comment>/* INFO = 5 THE STEP IS TOO LARGE. */</SPAN><BR> <BR> <SPAN class=comment>/* INFO = 6 ROUNDING ERRORS PREVENT FURTHER ROGRESS.*/</SPAN><BR> <SPAN
class=comment>/* THERE MAY NOT BE A STEP WHICH SATISFIES */</SPAN><BR> <SPAN class=comment>/* THE SUFFICIENT DECREASE AND CURVATURE */</SPAN><BR> <SPAN class=comment>/* CONDITIONS. TOLERANCES MAY BE TOO SMALL. */</SPAN><BR> <SPAN class=comment>/* IFLAG=-2 The i-th diagonal element of the diagonal inverse */</SPAN><BR> <SPAN
class=comment>/* Hessian approximation, given in DIAG, is not */</SPAN><BR> <SPAN class=comment>/* positive. */</SPAN><BR> <BR> <SPAN class=comment>/* IFLAG=-3 Improper input parameters for LBFGS (N or M are */</SPAN><BR> <SPAN class=comment>/* not positive). */</SPAN><BR><BR>You can observe that steplengh by watching</div> <div>*************************************************<BR> I NFN FUNC
GNORM STEPLENGTH</div> <div> </div> <DIV>where STEPLENGHT=is determined at each iteration by means of the <BR><SPAN class=comment> line search routine MCVSRCH which I dont think you can control it, only the </SPAN></DIV> <DIV>step size stopping tolerance</DIV> <div> </div> <div>Useful links:</div> <div>Numerical receipes</div> <div><A href="http://www.library.cornell.edu/nr/bookcpdf/c10-7.pdf">http://www.library.cornell.edu/nr/bookcpdf/c10-7.pdf</A></div> <div> </div> <div>and Wiki</div> <div><A href="http://en.wikipedia.org/wiki/BFGS_method">http://en.wikipedia.org/wiki/BFGS_method</A></div> <div> </div> <div>Also I recomend you can play with it first to see how actualy optimizer work here:</div> <div> </div> <div><A href="http://www.cse.uiuc.edu/eot/modules/optimization/BFGS/">http://www.cse.uiuc.edu/eot/modules/optimization/BFGS/</A></div> <div> </div> <div> </div>
<div> </div> <div>Teo</div> <div><BR><B><I>Matt Robert <matt.roberto@googlemail.com></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Another error I am getting is <BR><BR>IFLAG= -1. LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN<BR> OF LINE SEARCH: INFO=4 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE INCORRECT OR<BR>INCORRECT TOLERANCESvnl_lbfgs: ** EEEK **<BR>ExceptionObject caught !<BR><BR> <DIV><SPAN class=gmail_quote>On 8/25/06, <B class=gmail_sendername>Matt Robert</B> <<A href="mailto:matt.roberto@googlemail.com">matt.roberto@googlemail.com</A>> wrote:</SPAN> <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"> <DIV>Hi,<BR><BR>I used example DeformableRegistration4 to register two images. It works perfectly well and gives good results while reading images from disk.
<BR><BR>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. <BR><BR>If I save these two slices on disk and use the example, then it works. <BR><BR>Initial Parameters =<BR>[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<BR>, 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,<BR>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,<BR> 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<BR>, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]<BR><BR>Starting Registration<BR> F = 0.00143433, GNORM = 0<BR>*************************************************<BR> I NFN FUNC
GNORM STEPLENGTH<BR>THE SEARCH DIRECTION IS NOT A DESCENT DIRECTIONIFLAG= -1. LINE SEARCH FAILED. SE<BR>E DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN OF LINE SEARCH: INFO=0 POSSIBLE<BR>CAUSES: FUNCTION OR GRADIENT ARE INCORRECT OR INCORRECT TOLERANCESvnl_lbfgs: **<BR> EEEK **<BR>ExceptionObject caught !<BR><BR>itk::ExceptionObject (0137F814)<BR>Location: "unknown"<BR>File: \itksrc\Code\Numerics\itkLBFGSOpt<BR>imizer.cxx<BR>Line: 265<BR>Description: itk::ERROR: LBFGSOptimizer(01905DD0): Error occured in optimization<BR><BR>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. <BR></DIV> <DIV><SPAN
class=sg><BR>Matt<BR><BR></SPAN></DIV></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Insight-users mailing list<BR>Insight-users@itk.org<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BLOCKQUOTE><BR><p> 
                <hr size=1>Stay in the know. Pulse on the new Yahoo.com. <a href="http://us.rd.yahoo.com/evt=42974/*http://www.yahoo.com/preview"> Check it out.</a>