Yes, you should report it here: <a href="http://public.kitware.com/Bug/">http://public.kitware.com/Bug/</a><div><br></div><div>Regards,</div><div>Dženan<br><br><div class="gmail_quote">On Tue, Jun 22, 2010 at 13:39, Aurelien Bricier <span dir="ltr">&lt;<a href="mailto:aurelien.bricier@c-s.fr">aurelien.bricier@c-s.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello ITK users,<br>
<br>
I tried to read a 4 channels (RGBA) png image file into an<br>
itk:Image&lt;unsigned char, 2&gt; and the output image makes no sense. It<br>
appears that it works fine with RGB png images. In fact, I located the<br>
issue in ConvertPixelBuffer::ConvertRGBAToGray() that computes the<br>
grayscale pixel value by applying the following formula:<br>
<br>
((2125.0 * static_cast&lt;double&gt;RedPixelValue +<br>
  7154.0 * static_cast&lt;double&gt;GreenPixelValue +<br>
  0721.0 * static_cast&lt;double&gt;BluePixelValue)/1000.0)        //OK<br>
     * static_cast&lt;double&gt;AlphaPixelValue<br>
//Here is the issue<br>
<br>
In a RGBA png image, the range of AlphaPixelValue is [0,255]. The<br>
resulting grayscale value is no longer reasonably allowed to be casted<br>
into an unsigned char. That&#39;s why the reader output doesn&#39;t make any<br>
sense. I isolated this behavior in the attachment. Is there another<br>
place where I should report this bug?<br>
<br>
Regards,<br><font color="#888888">
Aurelien.<br>
<br>
</font><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><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.html" target="_blank">http://www.kitware.com/products/protraining.html</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://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>