<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Sharath,<div><br></div><div>This conversion is done through with itk::ConvertPixelBuffer:</div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1ConvertPixelBuffer.html">http://www.itk.org/Doxygen/html/classitk_1_1ConvertPixelBuffer.html</a></div><div><br></div><div>This class is responsible for doing all the conversions that occur when reading an image from a file into your itk::Image. When the types don't match it auto-magically converts the types. This enable one to read a file of chars into an itk::Image of floats with out any problems.</div><div><br></div><div>For you particular case it computes the luminance based on the RGB values to get "grey" pixels. The RGBToLuminance filter should give simular results as well. </div><div><br></div><div>Brad</div><div><br><div><div>On Jul 8, 2009, at 3:19 PM, Sharath Venkatesha wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Hi,<br><br>I observed that it works, if I give RGB input image to a ImageFileReader defined with 'unsigned char' type. <br>Is the behaviour defined?Are there many approximations involved?<br><br>I generally use itkRGBToLuminanceImageFilter to convert RGB input images to grayscale, before performing registration.<br><br><br>Thanks,<br>Sharath<br><br><br><br><br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">========================================================</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-family: Arial; "><span class="Apple-style-span" style="font-family: Arial; ">Lockheed Martin </span></span></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Contractor for</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Office of High Performance Computing and Communications</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span> </div><br></div></body></html>