<DIV id=RTEContent>Hi,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I compiled DeformableRegistration8.cxx and is working nice for your 2d examples.</DIV>  <DIV>But when I tried with a 3D image I get the following error:</DIV>  <DIV>Anyone knows how to set the parameters of the <FONT size=2>  <div>itkLBFGSOptimizer especially <FONT color=#008000 size=2>gradient convergence tolerance</FONT></FONT>? </div>  <div>(<FONT size=2>GradientConvergenceTolerance( 0.05),LineSearchAccuracy( 0.9 ),DefaultStepLength( 1.5 ))</div></FONT></DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>I:\testDemons\Release&gt;DeformableRegistration8.exe a0.mhd a1.mhd out.mhd dif.mhd<BR>difbef.mhd def.mhd<BR>Starting Registration with low resolution transform<BR>&nbsp;F = 0.078992, GNORM = 0.00257755<BR>*************************************************<BR>&nbsp;&nbsp; I&nbsp;&nbsp; NFN&nbsp;&nbsp;&nbsp; FUNC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 GNORM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STEPLENGTH<BR>IFLAG= -1. LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN<BR>&nbsp;OF LINE SEARCH: INFO=4 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE&nbsp; INCORRECT OR<BR>INCORRECT TOLERANCESvnl_lbfgs: ** EEEK **<BR>ExceptionObject caught !</DIV>  <DIV>itk::ExceptionObject (0102FC74)<BR>Location: "Unknown"<BR>File: c:\Insight\Code\Numerics\itkLBFGSOptimizer.cxx<BR>Line: 265<BR>Description: itk::ERROR: LBFGSOptimizer(014C0610): Error occured in optimization</DIV><p>
                <hr size=1> <a href="http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/">Yahoo! FareChase - Search multiple travel sites in one click.</a>