[ITK] [ITK-users] Bug in itkMattesMutualInformationImageToImageMetric.hxx ?

Ivan Setiawan ivans at yahoo.co.jp
Fri May 1 02:54:45 EDT 2015


Hi all,
My name is Ivan, and currently I am developing an image registration software based on ITK.
Thank you for providing such a good library!

I think, I found a bug for determining the voxel's value range in itkMattesMutualInformationImageToImageMetric.hxx.

In the ::Initialize(void) method, the initial value of this->m_FixedImageTrueMax and this->m_MovingImageTrueMax should be set to
    std::numeric_limits<typename TFixedImage::PixelType>::lowest()  /* i.e., the most negative value, = -340282346638528860000000000000000000000.000000 for float-type image */
instead of
    std::numeric_limits<typename TFixedImage::PixelType>::min() /* = 1.17549e-038 for float-type image. */


The code lines are:
    this->m_FixedImageTrueMax = std::numeric_limits<typename TFixedImage::PixelType>::min(); // should be lowest() instead of min()?
    this->m_MovingImageTrueMax = std::numeric_limits<typename TMovingImage::PixelType>::min(); // should be lowest() instead of min()?


Problem will not appear when using short-type image, but when a float-type image with all negative voxel's value is used as input, then the initial m_FixedImageTrueMax will NOT be updated to the correct negative maximum value.

Could you please tell me your opinion?

Thank you very much for your attention.

Best regards,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150501/539f9588/attachment.html>
-------------- next part --------------
_____________________________________
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.php

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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list