[Insight-users] RGB image to gray Image
Luis Ibanez
luis.ibanez at kitware.com
Sun Oct 31 12:50:11 EST 2004
Hi Pan,
If you read an RGB image using an ImageFileReader<>
that has been instantiated for a GrayScale image, then
the reader will convert RGB to GrayScale for you.
You can also use explicitly the filter
RGBToLuminanceImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RGBToLuminanceImageFilter.html
You can also convert grayscale to RGB but that will be
done by setting the three channels (R,G,B) to the same
value, which is just a replication of memory. The simple
way to do it would be to write an adaptor following the
examples of the ITK Software Guide.
http://www.itk.org/ItkSoftwareGuide.pdf
Chapter 12, pdf-page 521-532.
Please let us know if you have further questions,
Thanks
Luis
----------------
Pan Ross wrote:
> Is there a filter to change a RGB image to gray image , and change a
> gray image to RGB image?
>
>
> Thanks
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list