[Insight-users] some bugs

Marius Staring marius at isi.uu.nl
Thu Apr 6 06:18:44 EDT 2006


Related to this:

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.

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?

Marius

Marius Staring wrote:
> Hi all,
>
> I want to report a bug/annoyance in the 
> NormalizedCorrelationImageToImageMetric:
>
> 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.
>
> 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.
>
> Best regards,
> -- 
> 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
> marius at isi.uu.nl, http://www.isi.uu.nl/People/Marius
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>   

-- 
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
marius at isi.uu.nl, http://www.isi.uu.nl/People/Marius

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060406/96b74301/attachment.htm


More information about the Insight-users mailing list