[Insight-users] from gray image to RGB image

Agnes Masson-Sibut agnes.massonsibut at gmail.com
Mon Mar 29 07:38:36 EDT 2010


Hello Edoardo,

To convert a gray level image in RGB image, you can use a CastFilter (
http://www.itk.org/Doxygen/html/classitk_1_1CastImageFilter.html)

Regards,

Agnès

2010/3/28 <edoardo.belletti at alice.it>

>  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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


-- 
Agnès Masson-Sibut
Étudiante au doctorat
Lissi, Université Paris Est Créteil
Aesculap SAS, Dpt R&D Software
tél : 06-73-60-52-91
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100329/1b4f7a37/attachment.htm>


More information about the Insight-users mailing list