It looks like ComposeRGBImageFilter is what you are looking for:<div><br></div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1ComposeRGBImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1ComposeRGBImageFilter.html</a></div>
<div><br></div><div>Cory<br><br><div class="gmail_quote">On Tue, May 25, 2010 at 4:19 AM, Rahul P.Kumar <span dir="ltr"><<a href="mailto:aarkay0001@yahoo.com">aarkay0001@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Hi everyone,</div><div><br></div><div>How can I convert 3 different gray scale images into one RGB image?</div>
<div><br></div><div>I tried using iterator with the pixel type as RGB but could not set more than one value to the pixel.</div><div>In the description of RGBpixel, it specifies a function </div><span style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px"><table border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td nowrap align="right" valign="top" style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:13px;padding-top:1px;padding-right:0px;padding-bottom:0px;padding-left:8px;margin-top:4px;margin-right:4px;margin-bottom:4px;margin-left:4px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:rgb(224, 224, 224);border-right-color:rgb(224, 224, 224);border-bottom-color:rgb(224, 224, 224);border-left-color:rgb(224, 224, 224);border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none;background-color:rgb(250, 250, 250)">
void </td><td valign="bottom" style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:13px;padding-top:1px;padding-right:8px;padding-bottom:0px;padding-left:8px;margin-top:4px;margin-right:4px;margin-bottom:4px;margin-left:4px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:rgb(224, 224, 224);border-right-color:rgb(224, 224, 224);border-bottom-color:rgb(224, 224, 224);border-left-color:rgb(224, 224, 224);border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none;background-color:rgb(250, 250, 250)">
<a href="http://www.itk.org/Doxygen316/html/classitk_1_1RGBPixel.html#137c282f9d5ed7329a54dfc501a97ad9" style="color:rgb(26, 65, 168);text-decoration:none;font-weight:bold" target="_blank">Set</a> (<a href="http://www.itk.org/Doxygen316/html/classitk_1_1RGBPixel.html#98aad6da6a722513f1c3d85bab9c7cd3" style="color:rgb(42, 55, 152);text-decoration:none;font-weight:bold" target="_blank">ComponentType</a> red, <a href="http://www.itk.org/Doxygen316/html/classitk_1_1RGBPixel.html#98aad6da6a722513f1c3d85bab9c7cd3" style="color:rgb(42, 55, 152);text-decoration:none;font-weight:bold" target="_blank">ComponentType</a> green, <a href="http://www.itk.org/Doxygen316/html/classitk_1_1RGBPixel.html#98aad6da6a722513f1c3d85bab9c7cd3" style="color:rgb(42, 55, 152);text-decoration:none;font-weight:bold" target="_blank">ComponentType</a> blue)</td>
</tr></tbody></table><br></span><div></div>
<div><span style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px">But I could not figure out how to use it.</span></div><div><span style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px"><br>
</span></div><div><span style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px"><br></span></div><div><span style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px">Best Regards,</span></div>
<div><span style="font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px">Rahul</span></div></div><font color="#888888"><br>
</font></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>Cory Quammen<br>Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)<br>Department of Computer Science<br>University of North Carolina at Chapel Hill<br>
<a href="http://www.cs.unc.edu/~cquammen">http://www.cs.unc.edu/~cquammen</a><br>
</div>