[Insight-users] convert gray value image to RGB image
Luis Ibanez
luis.ibanez at kitware.com
Mon Oct 6 09:17:20 EDT 2008
Hi Zhihong,
Do you want to convert the grayscale image to RGB by simply duplicating
the pixel values in all the three channels ?
Or do you want to use a Lookup table in order to generate 'false'
color ?
If you want the second one, then you may want to look a the combined
use of the classes:
#include "itkUnaryFunctorImageFilter.h"
#include "itkScalarToRGBPixelFunctor.h"
as illustrated in
Insight/Examples/Segmentation/WatershedSegmentation1.cxx
Regards,
Luis
-----------------------
zhihong hu wrote:
> Hi Luis,
>
> I know there is an image adaptor in ITK, which can take out one
> component (such as green channel) from RGB images. I am wondering if
> there is some function that can convert gray value images to RGB images.
>
> Thank you very much.
>
> Zhihong
>
More information about the Insight-users
mailing list