[ITK-users] [ITK] Bug in itkMattesMutualInformationImageToImageMetric.hxx ?
Ivan Setiawan
ivans at yahoo.co.jp
Tue May 5 07:09:56 EDT 2015
Sorry, I meant:
"Following your suggestions, I've changed the initial ImageTrueMax to NumericTraits::NonpositiveMin().
Also, I've change the initial ImageTrueMin to NumericeTraits::max(), to unify it with the above.
Three files were modified."
Best regards,
Ivan
----- Original Message -----
>From: Ivan Setiawan <ivans at yahoo.co.jp>
>To: Bradley Lowekamp <blowekamp at mail.nih.gov>; Bill Lorensen <bill.lorensen at gmail.com>
>Cc: insight-users <insight-users at itk.org>
>Date: 2015/5/5, Tue 20:05
>Subject: Re: [ITK-users] [ITK] Bug in itkMattesMutualInformationImageToImageMetric.hxx ?
>
>
>Hi Brad, Bill,
>
>
>Following your suggestions, I've changed the initial ImageTrueMin to NumericTraits::NonpositiveMin().
>Also, I've change the initial ImageTrueMax to NumericeTraits::max(), to unify it with the above.
>Three files were modified.
>
>
>
>This is the first time for me to submit a patch, and I don't know the best-fit reviewers, so I chose both of you.
>
>
>Thank you and best regards,
>Ivan Setiawan
>
>
>----- Original Message -----
>>From: Bradley Lowekamp <blowekamp at mail.nih.gov>
>>To: Bill Lorensen <bill.lorensen at gmail.com>
>>Cc: Ivan Setiawan <ivans at yahoo.co.jp>; insight-users <insight-users at itk.org>
>>Date: 2015/5/1, Fri 21:16
>>Subject: Re: [ITK] [ITK-users] Bug in itkMattesMutualInformationImageToImageMetric.hxx ?
>>
>>Hello,
>>
>>The numeric_limits::lowest() seems to be a new C++11 method [1].
>>
>>I believe
NumericTraits::NonpositiveMin() will work.
>>
>>Thanks for finding this issue! Please include a test :)
>>
>>Brad
>>
>>
>>[1] http://en.cppreference.com/w/cpp/types/numeric_limits/lowest
>>
>>On May 1, 2015, at 8:04 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>
>>> Looks like you found a bug. Please submit a patch through gerrit:
>>> http://www.itk.org/Wiki/ITK/Git/Develop
>>>
>>> Thanks
>>>
>>>
>>> On Fri, May 1, 2015 at 2:54 AM, Ivan Setiawan <ivans at yahoo.co.jp> wrote:
>>>> 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
>>>>
>>>>
>>>> _____________________________________
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>>> _____________________________________
>>> 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
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>
>>
>>
>>
>_____________________________________
>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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150505/3851ac12/attachment.html>
More information about the Insight-users
mailing list