[Insight-users] Regarding using RGB colors with pixels in ITKImage
Luis Ibanez
luis.ibanez at kitware.com
Sat, 24 Jan 2004 10:45:36 -0500
Hi Shiva,
Thanks for pointing this out.
This issue was entered as Bug # 537
http://www.itk.org/Bug/bug.php?op=show&bugid=537&pos=0
and has been fixed in CVS.
Please update your CVS checkout and
give it a try.
Let us know if you find any problems.
Thanks
Luis
---------------------
Shiva Kumar wrote:
> hi everyOne,
>
> For creating an Image using Itk I am defining image as
> for ex:
> typedef unsigned int PixelType;
> typedef itk::Image < PixelType, 2 > ImageType;
> here we are using unsigned int but how to associate a color with pixel?.
>
> there is another template class for specifying pixelType like:
> typedef itk::RGBPixel< Unsigned char> pixelType
> typedef itk::Image < PixelType, 2 > ImageType
>
> This works fine but the problem is I am using a filter
> itktovtkImageFilter to convert into vtkImage for rendering
> but this filter will not accept RGBPixeltype.
> Then if i use unsigned int or unsigned char how can i specify the color
> values.
> How does the filter knows about color representation?
>
> Please anybody has the answer let me know ASAP.
>
> Thanks and Regds
> Shiva kumar
>