[ITK Community] Issues in itkNormalizedCorrelationImageToImageMetric

Cherel, Marie C cherel at email.unc.edu
Mon Jan 13 12:17:04 EST 2014


Hi everyone,

I am writing because I have some issues with the class itkNormalizedCorrelationImageToImageMetric.
I use this class in order to compute locally the normalized cross correlation between two brain MRIs that have been registered.

So for each voxel I define a small neighborhood around this voxel (with a radius of 2 or 3 pixels for example) and then this region is set to the metric via the method SetFixedImageRegion. Then I get the value of the metric for a transform set to identity.

But after I tried to use the method SetFixedImageSamplesIntensityThreshold in order to avoid the background and I did not get any difference. So I tried to do the intensity check by my self and to use the method SetFixedImageIndexes but the metric was always equal to 0.

So I looked into the source code of itkImageToImageMetric and itkNormalizedCorrelationImageToImageMetric. It seems that the parent class creates and fills a FixedImageIndexContainer which contains only the pixels that satisfy the threshold limitation, but this variable is not use in the itkNormalizedCorrelationImageToImageMetric class. itkNormalizedCorrelationImageToImageMetric only uses the fixedImageRegion and the masks, so it is what I used to figured out this problem. I also skip the first index selection which is useless by setting SetNumberOfFixedImageSamples to 0.

Now the results seems to be fine, but please let me know if I misunderstood something.
Many thanks for considering my request,

Marie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140113/e77090f3/attachment-0002.html>


More information about the Community mailing list