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

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 6 14:15:13 EST 2010


Hi Darren,

The feature that you are referring to, is only available
in the new version of the metrics that are in the
Code/Review directory.

In order to use this classes you must reconfigure your
binary build of ITK, by rerunning CMake and turning
ON the CMake variables:

   *  ITK_USE_REVIEW
   *  OPTIMIZED_REGISTRATION_METHODS

Then you can rebuild your application.


     Regards,


            Luis


-----------------------------------------------------------------------------------
On Thu, Mar 4, 2010 at 5:56 PM, Darren Weber
<darren.weber.lists at gmail.com> wrote:
>
> 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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list