[ITK Community] Issues in itkNormalizedCorrelationImageToImageMetric
Luis Ibanez
luis.ibanez at kitware.com
Mon Jan 13 22:15:09 EST 2014
Marie,
Your observation is correct.
There is a bit of history on this.
The short story is that when some of the ImageToImage metrics were
refactored
to support multi-threading, the itkNormalizedCorrelationImageToImageMetric,
was not refactored along with them.
Therefore, it doesn't uses some of the API methods that were added at the
time
to the base class, the itkImageToImageMetric. In particular, it does not
take into
account the collection of pixel samples that are generated in the base
class.
(which includes the options for ignoring pixels based on a threshold).
HTH
Luis
On Mon, Jan 13, 2014 at 12:17 PM, Cherel, Marie C <cherel at email.unc.edu>wrote:
> 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
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140113/a4a52af5/attachment-0002.html>
More information about the Community
mailing list