<html><body><div style="color:; background-color:; font-family:MS Gothic, monospace, sans-serif;font-size:12pt"><div>Hi all,</div><div>My name is Ivan, and currently I am developing an image registration software based on ITK.</div><div>Thank you for providing such a good library!</div><div><br></div><div>I think, I found a bug for determining the voxel's value range in itkMattesMutualInformationImageToImageMetric.hxx.</div><div><br></div><div>In the ::Initialize(void) method, the initial value of <span style="font-size: 12pt;">this->m_FixedImageTrueMax and </span><span style="font-size: 12pt;">this->m_MovingImageTrueMax should be set to</span></div><div><span style="font-size: 12pt;">    </span><span style="font-size: 12pt;">std::numeric_limits<typename TFixedImage::PixelType>::lowest()  /* i.e., the most negative value, = -340282346638528860000000000000000000000.000000 for float-type image
 */</span></div><div><span style="font-size: 12pt;">instead of</span></div><div><span style="font-size: 12pt;">    std::numeric_limits<typename TFixedImage::PixelType>::min() /* = 1.17549e-038 for float-type image. */<br></span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">The code lines are:</span></div><div><div>    this->m_FixedImageTrueMax = std::numeric_limits<typename TFixedImage::PixelType>::min(); // should be lowest() instead of min()?</div><div><span style="font-size: 12pt;">    this->m_MovingImageTrueMax = std::numeric_limits<typename TMovingImage::PixelType>::min(); // should be lowest() instead of min()?</span><br></div><div><span style="font-size: 12pt;"><br></span></div><div>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, <span style="font-size:
 12pt;">then the initial m_FixedImageTrueMax will NOT be updated to the correct negative maximum value.</span></div></div><div><br></div><div>Could you please tell me your opinion?</div><div><br></div><div>Thank you very much for your attention.</div><div><br></div><div>Best regards,</div><div>Ivan</div><div><br></div></div></body></html>