Another error I am getting is <br>
<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 !<br><br><div><span class="gmail_quote">On 8/25/06, <b class="gmail_sendername">Matt Robert</b> &lt;<a href="mailto:matt.roberto@googlemail.com">matt.roberto@googlemail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<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>
&nbsp;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>
&nbsp;F = 0.00143433, GNORM = 0<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>
THE SEARCH DIRECTION IS NOT A DESCENT DIRECTIONIFLAG= -1. LINE SEARCH FAILED. SE<br>
E DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN&nbsp; OF LINE SEARCH: INFO=0 POSSIBLE<br>
CAUSES: FUNCTION OR GRADIENT ARE&nbsp; INCORRECT OR INCORRECT TOLERANCESvnl_lbfgs: **<br>
&nbsp;EEEK **<br>
ExceptionObject caught !<br>
<br>
itk::ExceptionObject (0137F814)<br>
Location: &quot;unknown&quot;<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>