Hi Dan,<br><br>Thanks, I&#39;ve been using ITK for a while now and I didn&#39;t know about this feature of optimizers.<br><br>All the metrics I know in ITK go &quot;down&quot;. There was no special documentation, so that&#39;s what I expected. For comparison, the Mutual Information metric, which is something you want to maximize, is actually minimized by the framework. <br>
<br>I think people shouldn&#39;t use the metric like you suggest. Defaults are important if you want the registration metric to be modular&nbsp; (&quot;plug-and-play&quot;).<br><br>Please try to imagine the typical user experience with this metric. It is EXTREMELY frustrating, because you have to play around with many optimization parameters before you either debug it or give up. Who knows how many users went down the path Sven and I went before giving up? I know of at least two more users who gave up.<br>
<br>So for future reference, I still classify this bug as really &quot;huge&quot;.<br><br>Kind regards,<br><br>- Aviv<br><br><div class="gmail_quote">On Thu, Jun 26, 2008 at 9:20 AM, Dan Mueller &lt;<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>&gt; 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 Aviv,<br>
<br>
2008/6/25 Aviv Hurvitz &lt;<a href="mailto:aviv.hurvitz@gmail.com">aviv.hurvitz@gmail.com</a>&gt;:<br>
<div class="Ih2E3d">&gt; In short, the GradientDifferenceImageToImageMetric is bad! It has one huge<br>
&gt; bug and a few other debatable problems. The huge bug is that it returns the<br>
&gt; MAXIMUM value when the registered images are perfectly aligned, whereas it<br>
&gt; should return the MINIMUM. That&#39;s right, this metric actually pushes the<br>
&gt; moving image away from the right result.<br>
&gt;<br>
&gt; I wonder how this came to be? My guess is that the original developer was<br>
&gt; using it in a different framework, where registration involved maximizing. I<br>
&gt; Googled a bit and the few reports on this metric were either that it doesn&#39;t<br>
&gt; work or that it *maybe* works, so I guess it &nbsp;checks out.<br>
<br>
</div>For future reference, this is not really a &quot;huge&quot; bug. Optimizers can<br>
be configured to either minimize or maximize a metric; simply call<br>
optimizer-&gt;MinimizeOn() or optimizer-&gt;MinimizeOff() depending on your<br>
chosen metric.<br>
<br>
HTH<br>
<br>
Regards, Dan<br>
</blockquote></div><br>