<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi everyone,
<br>
<br>
I am writing because I have some issues with the class itkNormalizedCorrelationImageToImageMetric.<br>
I use this class in order to compute locally the normalized cross correlation between two brain MRIs that have been registered.
<br>
<br>
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.
<br>
<br>
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. <br>
<br>
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.<br>
<br>
Now the results seems to be fine, but please let me know if I misunderstood something.
<br>
Many thanks for considering my request, <br>
<br>
Marie<br>
</div>
</body>
</html>