[Insight-users] NormalizedCorrelationImageToImageMetric speedup
Marius Staring
marius at isi.uu.nl
Mon Apr 10 06:01:11 EDT 2006
Hi all,
The current GetDerivative() and GetValueAndDerivative() from the
NormalizedCorrelationImageToImageMetric loop twice over the fixed image.
This is not neccesary, one time is enough to calculate the metric value
and the derivative to the transform parameters. I have rewritten this
class to do so, and this gives the expected (almost) two times speedup.
Also I have added the possibility to compute the metric over only a
random subset of the fixed image pixels. This reduces the computation
time (substantially), while convergence properties are maintained. It is
similar to the MattesMutualInformationMetric, but there a fixed subset
is used.
I have added this code as an attachment. Feel free to commit it to the
repository (the code also contains some small bug fixes). I have tested
that, when using all pixels in the fixed image, the new code gives
exactly the same output as the current itk code.
I have also implemented the possibillity to use a random subset in the
MeanSquaresImageToImageMetric (shouldn't that be called the
MeanSquareDifferenceImageToImageMetric?) This is also attached.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CCandMScode.zip
Type: application/x-zip-compressed
Size: 12001 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060410/40fa0fe9/CCandMScode.bin
More information about the Insight-users
mailing list