[Insight-users] from gray image to RGB image

Luis Ibanez luis.ibanez at kitware.com
Mon Mar 29 18:52:11 EDT 2010


Hi Edoardo,


You may also want to use the filter:

       itkScalarToRGBColormapImageFilter.h

That you will find in the directory:

      Insight/Code/Review

and that is described in the following
Insight Journal paper:

http://www.insight-journal.org/browse/publication/285
http://hdl.handle.net/1926/1452

"Meeting Andy Warhol Somewhere Over the Rainbow: RGB Colormapping and ITK"
by Tustison N., Zhang H., Lehmann G., Yushkevich P., Gee J.



    Regards,


         Luis


---------------------------------------------------------------
On Sun, Mar 28, 2010 at 2:46 PM,  <edoardo.belletti at alice.it> wrote:
> 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
>
>


More information about the Insight-users mailing list