<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Related to this:<br>
<br>
The boolean m_ComputeGradient is standard set to true in the
ImageToImageMetric. However, there are some metrics that do not use
this gradient image, but forget to set it to false. This will result in
a performance penalty, because you are calculating something in
Initialize() that you never use. Examples of such metrics are the
MeanReciprocalSquareDifferenceImageToImageMetric and classes deriving
from the HistogramImageToImageMetric, a notable exeption is the
MattesMutualInformationImageToImageMetric.<br>
<br>
Maybe it is better to set the default to false and set it to true for
metrics that use it. Isn't it dangerous to have the function
SetComputeGradient(bool) accesible by the user, because it is more
dependend on the specific metric?<br>
<br>
Marius<br>
<br>
Marius Staring wrote:
<blockquote cite="mid4434E4D4.70900@isi.uu.nl" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Hi all,<br>
  <br>
I want to report a bug/annoyance in the
NormalizedCorrelationImageToImageMetric:<br>
  <br>
The NormalizedCorrelationImageToImageMetric does not check the
m_ComputeGradient bool when calculating the derivative in both
GetDerivative() and GetValueAndDerivative(). It assumes that this bool
is true and it also depends on this assumption. However, there exists a
function, inherited from the ImageToImageMetric, called
SetComputeGradient(bool)
which enables the user to set it to false. Doing so would result in
throwing an exeption.<br>
  <br>
I have added this as bug #3103 in the bugtracker. When doing so I
noticed that it is not possible to set the itk version to 2.6: 2.4 was
the highest version possible.<br>
  <br>
Best regards,<br>
  <pre class="moz-signature" cols="60">-- 
Marius Staring
Image Sciences Institute
University Medical Centre Utrecht
Heidelberglaan 100, 3584 CX Utrecht, The Netherlands
phone: +31 (0)30 250 3186, fax: +31 (0)30 251 3399
<a class="moz-txt-link-abbreviated" href="mailto:marius@isi.uu.nl">marius@isi.uu.nl</a>, <a
 class="moz-txt-link-freetext" href="http://www.isi.uu.nl/People/Marius">http://www.isi.uu.nl/People/Marius</a></pre>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Insight-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="60">-- 
Marius Staring
Image Sciences Institute
University Medical Centre Utrecht
Heidelberglaan 100, 3584 CX Utrecht, The Netherlands
phone: +31 (0)30 250 3186, fax: +31 (0)30 251 3399
<a class="moz-txt-link-abbreviated" href="mailto:marius@isi.uu.nl">marius@isi.uu.nl</a>, <a class="moz-txt-link-freetext" href="http://www.isi.uu.nl/People/Marius">http://www.isi.uu.nl/People/Marius</a></pre>
</body>
</html>