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>
<br>
Matt<br>
<br>