Hi Joel,<br><br>         Parameters, parameters, parameters....<br><br>It is a common mistake to blame an algorithm for a poor<br>selection of parameters.  This is a common symptom of<br>having passed too much time reading non-reproducible <br>
journals, and not enough time tinkering with code.<br><br>---<br><br>The RegularStepGradientDescent optimizer has several<br>convergence criteria.<br><br>One of them is the size of the step length.<br><br>Whenever the optimizer detects that the gradient has <br>
changed directions, it reduces its step length by a <br>factor (given by the &quot;relaxation factor&quot; which by <br>default is set to 0.5).<br><br>If your optimizer has bounced a lot during the initial<br>17 iterations, the step length may have been reduced<br>
already below the threshold set in <br><br>    optimizer-&gt;SetMinimumStepLength( 0.01 );<br><br>You can verify this by printing, at the end of the <br>registration, the criterion that stopped the optimizer.<br><br>  std::cout &lt;&lt; optimizer-&gt;GetStopConditionDescription() &lt;&lt; std::endl;<br>
<br>and/or<br><br>  std::cout &lt;&lt; optimizer-&gt;GetStopCondition() &lt;&lt; std::endl;<br><br><br>If the step length is the reason why the optimizer is stopping<br>too early, you can simply reduce the initial step length (to<br>
avoid unnecessary bouncing) and increase the relaxation <br>factor (to, for example : 0.9).<br><br><br><br>      Regards,<br><br><br>             Luis<br><br><br>--------------------------------------------------<br><div class="gmail_quote">
On Wed, Sep 9, 2009 at 2:50 AM, Daouk Joël <span dir="ltr">&lt;<a href="mailto:Daouk.Joel@chu-amiens.fr">Daouk.Joel@chu-amiens.fr</a>&gt;</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;">




<div>
<div><span><font size="2" face="Arial">Hi 
every-body,</font></span></div>
<div><span><font size="2" face="Arial"></font></span> </div>
<div><span><font size="2" face="Arial">I am a newbie in ITK 
and I tried to use the ImageRegistration1.cxx with 2 (very) simple images. The 
fixed image was a 168x168 null image (pixel spacing = 1.0 and element size 
= 1.0) where I drew a centered filled square (pixel value = 35). The moving 
image was the same image with a simple translation of the square (dx = 10, dy = 
5 pixels). When using ImageRegistration1 (MaximumStepLenght = 4.0, 
MinimumStepLenght=0.01, MaximizeOff, NumberOfIterations=200, MinimizeOn) with 
these data, the algorithm stops after only 17 iterations and gives 
translation parameters equal to dx=10.0000014214 dy=4.999978 and a final final 
non-equal to 0 (around 3e-9). Why ImageRegistration1 can not find the real 
solution on a so simple test data set ?</font></span></div>
<div><span><font size="2" face="Arial">Thanks in 
advance.</font></span></div>
<div><span><font size="2" face="Arial"></font></span> </div>
<div><span><font size="2" face="Arial">Cheers</font></span></div>
<div> </div>
<div align="left"><font size="2" face="Arial">Joël DAOUK</font></div>
<div align="left"><font size="2" face="Arial"></font> </div>
<div align="left"><font size="2" face="Arial">Unité TEP</font></div>
<div align="left"><font size="2" face="Arial">CHU Amiens hôpital Sud</font></div>
<div align="left"><font size="2" face="Arial">Avenue Laennec</font></div>
<div align="left"><font size="2" face="Arial">80480 Salouel</font></div>
<div align="left"><font size="2" face="Arial"></font> </div>
<div align="left"><font size="2" face="Arial">Tel : +33 3 22 45 60 15</font></div>
<div align="left"><font size="2" face="Arial"></font> </div>
<div align="left"><span lang="FR">
<p><font size="2">LEGAL CONFIDENTIAL: The information in this e-mail and in any 
attachment may contain information which is legally privileged. It is intended 
only for the attention and use of the named recipient. If you are not the 
intended recipient, you are not authorized to retain, disclose, copy or 
distribute the message and/or any of its attachments. If you received this 
e-mail in error, please notify me and delete this message. 
Thank-you.</font></p></span></div>
<div> </div></div>
 <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>
<br></blockquote></div><br>