[Insight-users] Re: GradientDifferenceImageToImageMetric?

D.F.Habets dhabets at imaging.robarts.ca
Tue Feb 21 12:09:26 EST 2006


Hi Vincent,

   thank you for replying.

> are you using the CVS version? Some time ago, I reported a bug on this metric 
> that was then corrected.

I should be using the CVS version. Could you let me know what the bug was? 
Or was it the one where the test was ran and the GetValue metric didn't 
change? The GetValue it returns seems ok, however, the derivatives are 
problematic.

> delta value is used here just to approximate the derivative with a finite 
> difference calculation. In other metrics, the derivative is calculated 
> explicitly.

Yes, that delta function seems to still be hard coded to 0.001, and 
I've changed that now, however, that still results in many cases where the 
derivative will always return 0 because the range of values for the 
parameters is larger.

I wasn't sure this was right either:

- In GetValue():
subtractionFactor[iDimension] shouldn't that never be 0? (It's initialised 
to 0)

- In ComputeVariance:
m_MinMovedGradient[iDimension] = gradient

shouldn't that be

m_MinFixedGradient[iDimension] = gradient; ?

Same for Max.

There's some more things that I find questionable, but it could just me 
misunderstanding some of the code.

Has anyone successfully used it? Or is the concensus that this metric 
isn't ready for use?

Thanks,
Damiaan


More information about the Insight-users mailing list