<html><body><div style="color:; background-color:; font-family:MS Gothic, monospace, sans-serif;font-size:12pt"><div><span>Sorry, I meant:</span></div><div><span><br></span></div><div><span><div><span>"Following your suggestions, I've changed the initial ImageTrueMax to NumericTraits::NonpositiveMin().</span></div><div><span>Also, I've change the initial ImageTrueMin to NumericeTraits::max(), to unify it with the above.</span></div><div><span style="font-size: 12pt;">Three files were modified."</span></div></span></div><div><br></div><div>Best regards,</div><div>Ivan</div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">    <div style="font-family: 'MS Gothic', monospace, sans-serif; font-size: 12pt;">        <div style="font-family: 'MS PGothic', sans-serif; font-size: 12pt;">            <div dir="ltr">            <font size="2" face="Arial">                ----- Original Message
 -----<br>                <b><span style="font-weight:bold;">From:</span></b> Ivan Setiawan <ivans@yahoo.co.jp><br>                <b><span style="font-weight: bold;">To:</span></b> Bradley Lowekamp <blowekamp@mail.nih.gov>; Bill Lorensen <bill.lorensen@gmail.com>                <br><b><span style="font-weight: bold;">Cc:</span></b> insight-users <insight-users@itk.org><br>                <b><span style="font-weight: bold;">Date:</span></b> 2015/5/5, Tue 20:05<br>                <b><span style="font-weight: bold;">Subject:</span></b> Re: [ITK-users] [ITK] Bug in itkMattesMutualInformationImageToImageMetric.hxx ?<br>            </font>            </div>            <br><div id="yiv1421667082"><div style="font-family: 'MS Gothic', monospace, sans-serif; font-size: 12pt;"><div><span>Hi Brad, Bill,</span></div><div><span><br></span></div><div><span>Following your suggestions, I've changed the initial ImageTrueMin to
 NumericTraits::NonpositiveMin().</span></div><div><span>Also, I've change the initial ImageTrueMax to NumericeTraits::max(), to unify it with the above.</span></div><div><span style="font-size:12pt;">Three files were modified.</span><br></div><div><br></div><div>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.</div><div><br></div><div>Thank you and best regards,</div><div>Ivan Setiawan</div><div><br><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;margin-top:5px;padding-left:5px;">    <div style="font-family: 'MS Gothic', monospace, sans-serif; font-size: 12pt;">        <div style="font-family:'MS
 PGothic', sans-serif;font-size:12pt;">            <div dir="ltr">            <font size="2" face="Arial">                ----- Original Message -----<br>                <b><span style="font-weight:bold;">From:</span></b> Bradley Lowekamp <blowekamp@mail.nih.gov><br>                <b><span style="font-weight:bold;">To:</span></b> Bill Lorensen <bill.lorensen@gmail.com>                <br><b><span style="font-weight:bold;">Cc:</span></b> Ivan Setiawan <ivans@yahoo.co.jp>; insight-users <insight-users@itk.org><br>                <b><span style="font-weight:bold;">Date:</span></b> 2015/5/1, Fri 21:16<br>                <b><span style="font-weight:bold;">Subject:</span></b> Re: [ITK] [ITK-users] Bug in itkMattesMutualInformationImageToImageMetric.hxx ?<br>            </font>            </div>            <br>Hello,<br><br>The numeric_limits::lowest() seems to be a new C++11 method [1].<br><br>I believe
 NumericTraits::NonpositiveMin() will work.<br><br>Thanks for finding this issue! Please include a test :)<br><br>Brad<br><br><br>[1] <a rel="nofollow" target="_blank" href="http://en.cppreference.com/w/cpp/types/numeric_limits/lowest">http://en.cppreference.com/w/cpp/types/numeric_limits/lowest</a><br><br>On May 1, 2015, at 8:04 AM, Bill Lorensen <<a rel="nofollow" ymailto="mailto:bill.lorensen@gmail.com" target="_blank" href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br><br>> Looks like you found a bug. Please submit a patch through gerrit:<br>> <a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK/Git/Develop">http://www.itk.org/Wiki/ITK/Git/Develop</a><br>> <br>> Thanks<br>> <br>> <br>> On Fri, May 1, 2015 at 2:54 AM, Ivan Setiawan <<a rel="nofollow" ymailto="mailto:ivans@yahoo.co.jp" target="_blank" href="mailto:ivans@yahoo.co.jp">ivans@yahoo.co.jp</a>> wrote:<br>>> Hi
 all,<br>>> My name is Ivan, and currently I am developing
 an image registration<br>>> software based on ITK.<br>>> Thank you for providing such a good library!<br>>> <br>>> I think, I found a bug for determining the voxel's value range in<br>>> itkMattesMutualInformationImageToImageMetric.hxx.<br>>> <br>>> In the ::Initialize(void) method, the initial value of<br>>> this->m_FixedImageTrueMax and this->m_MovingImageTrueMax should be set to<br>>>    std::numeric_limits<typename TFixedImage::PixelType>::lowest()  /* i.e.,<br>>> the most negative value, = -340282346638528860000000000000000000000.000000<br>>> for float-type image */<br>>> instead of<br>>>    std::numeric_limits<typename TFixedImage::PixelType>::min() /* =<br>>> 1.17549e-038 for float-type image. */<br>>> <br>>> The code lines are:<br>>>    this->m_FixedImageTrueMax =
 std::numeric_limits<typename<br>>> TFixedImage::PixelType>::min(); // should be lowest() instead of min()?<br>>>    this->m_MovingImageTrueMax = std::numeric_limits<typename<br>>> TMovingImage::PixelType>::min(); // should be lowest() instead of min()?<br>>> <br>>> Problem will not appear when using short-type image, but when a float-type<br>>> image with all negative voxel's value is used as input, then the initial<br>>> m_FixedImageTrueMax will NOT be updated to the correct negative maximum<br>>> value.<br>>> <br>>> Could you please tell me your opinion?<br>>> <br>>> Thank you very much for your attention.<br>>> <br>>> Best regards,<br>>> Ivan<br>>> <br>>> <br>>> _____________________________________<br>>> Powered by www.kitware.com<br>>> <br>>> Visit other Kitware open-source projects at<br>>> <a
 rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>>> <br>>> Kitware offers ITK Training Courses, for more information visit:<br>>> <a rel="nofollow" target="_blank" href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br>>> <br>>> Please keep messages on-topic and check the ITK FAQ at:<br>>> <a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>>> <br>>> Follow this link to subscribe/unsubscribe:<br>>> <a rel="nofollow" target="_blank" href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br>>> <br>> <br>> <br>> <br>> -- <br>> Unpaid intern in BillsBasement at noware dot com<br>>
 _____________________________________<br>> Powered by www.kitware.com<br>>
 <br>> Visit other Kitware open-source projects at<br>> <a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>> <br>> Kitware offers ITK Training Courses, for more information visit:<br>> <a rel="nofollow" target="_blank" href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br>> <br>> Please keep messages on-topic and check the ITK FAQ at:<br>> <a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>> <br>> Follow this link to subscribe/unsubscribe:<br>> <a rel="nofollow" target="_blank" href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br>> _______________________________________________<br>> Community mailing list<br>> <a rel="nofollow"
 ymailto="mailto:Community@itk.org" target="_blank" href="mailto:Community@itk.org">Community@itk.org</a><br>> <a rel="nofollow" target="_blank" href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a><br><br><br><br>        </div>    </div>    </blockquote></div>    </div></div><br>_____________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ"
 target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br><br><br>        </div>    </div>    </blockquote></div>    </div></body></html>