[vtkusers] vtkMapper, ColorMode Default

David Thompson david.thompson at kitware.com
Sat May 25 20:57:35 EDT 2013


Hi Henry,

> i am trying to understand the color mapping of vtkMapper and i am reading the doxygen....
> Now i wonder how unsigned char scalars are treated as colors. Do they mean unsigned char vecors with 3 components for RGB?

Yes, but other numbers of components are also accepted:

1 component -> luminance(greyscale)
2 components -> luminance + alpha
3 components -> RGB
4 components -> RGBA

See the implementation of vtkScalarsToColors::ConvertUnsignedCharToRGBA() and vtkPainterPolyDataMapper::GetIsOpaque().

	David


More information about the vtkusers mailing list