Hi Serena,<br><br>Why did you replace the <br><br> optimizer->GetCachedValue() <br><br>with <br><br> optimizer->GetValue()<br><br>??<br><br>With the original code<br><br> std::cout << optimizer->GetCurrentIteration() << " ";<br>
std::cout << optimizer->GetCachedValue() << " ";<br> std::cout << optimizer->GetInfinityNormOfProjectedGradient() << std::endl;<br><br><br>I get output similar to<br><br><br>
Starting Registration<br>0 -0.126569 0<br>0 -0.128309 0<br>0 -0.132048 0<br>0 -0.145772 0<br>0 -0.206432 0<br>0 -0.304187 0<br>0 -0.304187 0.000164939<br>1 -0.359927 0.000164939<br>1 -0.359927 0.00022934<br>
2 -0.289385 0.00022934<br><br>when registering the images:<br><br> brainweb165a10f17.mha<br> brainweb165a10f17Rot20Tx20.mha<br><br><br>Could you please restore the original code<br>and let us know if this time you get non-zero<br>
outputs ?<br><br><br> Thanks<br><br><br> Luis<br><br><br>--------------------------------------------------------------<br><div class="gmail_quote">On Tue, Jun 30, 2009 at 4:00 PM, Serena Fabbri <span dir="ltr"><<a href="mailto:fabbri@u.washington.edu">fabbri@u.washington.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi All,<br>
<br>
I am using DeformableRegistration8 with Mattes Mutual Information and LBFGSBoptimizer.<br>
I'd like to know how the MI and the parameters change in each iteration. In the example, class CommandIterationUpdate is implemented and I only add :<br>
<br>
std::cout <<"Iter "<<optimizer->GetCurrentIteration() << " ";<br>
std::cout <<" Metric "<<optimizer->GetValue() << ":";<br>
std::cout <<" Parameters "<<optimizer->GetCurrentPosition() << std::endl;<br>
<br>
I use a Bspline-grid with 3 bound nodes and 3 node in the image and I run fixed=MRI (176, 256, 160) (1,1,1)mm moving=CT (176, 256, 160) (1,1,1)mm<br>
<br>
The code runs, I get a pretty good registered image but Metric value and parameters values are always 0.<br>
could anybody point out me where the error is?<br>
are the above instructions wrong?<br>
<br>
<br>
Thanks.<br>
<br>
Serena.<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>