[Insight-users] exclude pixel values (background) from metrics

Darren Weber darren.weber.lists at gmail.com
Thu Mar 4 17:56:17 EST 2010


In an image registration framework, the metric determines image "matches".

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.

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.

See:
http://www.itk.org/Doxygen316/html/classitk_1_1ImageToImageMetric.html#42b876134388099afbf34b14faf83cdb

This documentation suggests there are also options to define:

IntensityThreshold, Masks, and SequentialSampling

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?

http://www.itk.org/Doxygen316/html/classitk_1_1MeanSquaresImageToImageMetric-members.html

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).

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?

I could not locate this method in the class hierarchy - is it available
(inherited) in all metrics?

I'm confused because these methods do not appear to be available
to itk::MeanSquaresImageToImageMetric

e.g.:  CODE:

    typedef itk::MeanSquaresImageToImageMetric< iBWImgType, iBWImgType >
MetricType;
    MetricType::Pointer metric = MetricType::New();
    metric->SetFixedImageSamplesIntensityThreshold( 0.0 );
    metric->SetUseAllPixels( true );

e.g.:  COMPILATION:

itkImageRigid2DCoregistration.cxx: In function ‘int main(int, char**)’:
itkImageRigid2DCoregistration.cxx:442: error: ‘class
itk::MeanSquaresImageToImageMetric<iBWImgType, iBWImgType>’ has no member
named ‘SetFixedImageSamplesIntensityThreshold’
itkImageRigid2DCoregistration.cxx:443: error: ‘class
itk::MeanSquaresImageToImageMetric<iBWImgType, iBWImgType>’ has no member
named ‘SetUseAllPixels’
gmake[2]: ***
[CMakeFiles/itkImageRigid2DCoregistration.dir/itkImageRigid2DCoregistration.cxx.o]
Error 1




TIA,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100304/ba5e434f/attachment-0001.htm>


More information about the Insight-users mailing list