[Insight-users] convert gray value image to RGB image

Nicholas Tustison ntustison at gmail.com
Mon Oct 6 09:33:15 EDT 2008


Hi Zhihong,

You might also want to look at the following IJ submission which might  
satisfy your needs.  Several colormaps are provided.

http://www.insight-journal.org/browse/publication/285

Nick


On Oct 6, 2008, at 9:17 AM, Luis Ibanez wrote:

>
> 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
> _______________________________________________
> 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