[Insight-users] from gray image to RGB image

edoardo.belletti at alice.it edoardo.belletti at alice.it
Sun Mar 28 14:46:17 EDT 2010


Hello
Is there someone that can explain me how can I convert a gray scale image in a RGB image?
for example if I define:

const unsigned int Dimension = 2;
typedef unsigned char PixelType;  
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::RGBPixel< unsigned char > ColorPixelType;
typedef itk::Image< ColorPixelType, Dimension >    ColorImageType;
ImageType::Pointer input = reader->GetOutput();
// (...) some operations with image
ColorImageType::Pointer image_c;

now how can I copy image in image_c?

Thank you very much
Edoardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100328/7844e629/attachment.htm>


More information about the Insight-users mailing list