<br><div>In an image registration framework, the metric determines image "matches".</div><div><br></div><div>Let's suppose we have large images that contain a majority of background color (or transparency). In a metric like the itk::MeanSquaresImageToImageMetric, the majority of the sqaured-diff-values would be zero and the remainder of the "relevant" pixel differences may be "swamped" or "lost" in the division by a large N.</div>
<div><br></div><div>Also, it appears the default metric sampling is a random-sample of the image pixels (this might be modified with methods like "SetUseAllPixels(bool)"). In this case, it is possible, perhaps likely, that few of the "relevant" pixels will be evaluated in the metric.</div>
<div><br></div><div>See:</div><div><a href="http://www.itk.org/Doxygen316/html/classitk_1_1ImageToImageMetric.html#42b876134388099afbf34b14faf83cdb">http://www.itk.org/Doxygen316/html/classitk_1_1ImageToImageMetric.html#42b876134388099afbf34b14faf83cdb</a></div>
<div><br></div><div>This documentation suggests there are also options to define:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; ">IntensityThreshold, Masks, and SequentialSampling</span></div>
<div><font class="Apple-style-span" face="Geneva, Arial, Helvetica, sans-serif" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div>In my reading of the doxy page (see next link), there is a method called "SetFixedImageSamplesIntensityThreshold" that might be useful to define a background value (like zero) to be excluded from the metric. Is that right?</div>
<div><br></div><div><a href="http://www.itk.org/Doxygen316/html/classitk_1_1MeanSquaresImageToImageMetric-members.html">http://www.itk.org/Doxygen316/html/classitk_1_1MeanSquaresImageToImageMetric-members.html</a></div><div>
<br></div><div><div>What is the logic of this "threshold" method? From the documentation, it appears to be a minima value. So if the background intensity is zero, the threshold value of 1 would include all pixels > 0 (note the threshold value must be the same type as the fixed image PixelType).</div>
<div><br></div></div><div>There is no equivalent method for the moving image, like "SetMovingImageSamplesIntensityThreshold". Is this unnecessary because the metric only scans the pixels of the moving image that fall within the "domain" of fixed image after the transform & interpolation?</div>
<div><br></div><div>I could not locate this method in the class hierarchy - is it available (inherited) in all metrics?</div><div><br></div><div>I'm confused because these methods do not appear to be available to itk::MeanSquaresImageToImageMetric</div>
<div><br></div><div>e.g.: CODE:</div><div><br></div><div><div> typedef itk::MeanSquaresImageToImageMetric< iBWImgType, iBWImgType > MetricType;</div><div> MetricType::Pointer metric = MetricType::New();</div>
<div> metric->SetFixedImageSamplesIntensityThreshold( 0.0 );</div><div> metric->SetUseAllPixels( true );</div><div><br></div></div><div>e.g.: COMPILATION:</div><div><br></div><div><div>itkImageRigid2DCoregistration.cxx: In function ‘int main(int, char**)’:</div>
<div>itkImageRigid2DCoregistration.cxx:442: error: ‘class itk::MeanSquaresImageToImageMetric<iBWImgType, iBWImgType>’ has no member named ‘SetFixedImageSamplesIntensityThreshold’</div><div>itkImageRigid2DCoregistration.cxx:443: error: ‘class itk::MeanSquaresImageToImageMetric<iBWImgType, iBWImgType>’ has no member named ‘SetUseAllPixels’</div>
<div>gmake[2]: *** [CMakeFiles/itkImageRigid2DCoregistration.dir/itkImageRigid2DCoregistration.cxx.o] Error 1</div><div><br></div></div><div><br></div><div><br></div><div><br></div><div>TIA,</div><div>Darren</div><div><br>
</div>