Hello Edoardo,<br><br>To convert a gray level image in RGB image, you can use a CastFilter (<a href="http://www.itk.org/Doxygen/html/classitk_1_1CastImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1CastImageFilter.html</a>)<br>

<br>Regards,<br><br>Agnès<br><br><div class="gmail_quote">2010/3/28  <span dir="ltr">&lt;<a href="mailto:edoardo.belletti@alice.it" target="_blank">edoardo.belletti@alice.it</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">








<div>


<p><font size="2">Hello<br>
Is there someone that can explain me how can I convert a gray scale image in a RGB image?<br>
for example if I define:<br>
<br>
const unsigned int Dimension = 2;<br>
typedef unsigned char PixelType; <br>
typedef itk::Image&lt; PixelType, Dimension &gt; ImageType;<br>
typedef itk::RGBPixel&lt; unsigned char &gt; ColorPixelType;<br>
typedef itk::Image&lt; ColorPixelType, Dimension &gt;    ColorImageType;<br>
ImageType::Pointer input = reader-&gt;GetOutput();<br>
// (...) some operations with image<br>
ColorImageType::Pointer image_c;<br>
<br>
now how can I copy image in image_c?<br>
<br>
Thank you very much<br>
Edoardo</font>
</p>

</div>
<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><br clear="all"><br>-- <br>Agnès Masson-Sibut<br>Étudiante au doctorat<br>Lissi, Université Paris Est Créteil<br>Aesculap SAS, Dpt R&amp;D Software<br>tél : 06-73-60-52-91<br>