[vtk-developers] Scalar coloring modes and polygonal rendering

David Thompson david.thompson at kitware.com
Wed Nov 12 12:53:26 EST 2014


Hi Utkarsh,

> ... vtkPolyDataMapper since a long time supports two coloring modes, viz.
> VTK_COLOR_MODE_DEFAULT and VTK_COLOR_MODE_MAP_SCALARS. ...
> 
> I am working on a feature request [1] to add support to not use a
> vtkScalarsToColors instance for non-unsigned-char arrays (including
> double/float), assuming they are in the range 0, 1.
> 
> To support this mode without breaking current behavior, I am thinking
> of adding a new VTK_COLOR_MODE_NO_MAP_SCALARS mode which can be used
> to force interpreting the data values as colors directly.
> 
> Any objections to that?

No, it would be a welcome change, especially with OpenGL2 which should accept floating-point textures.

> Also if any suggestions for the name for this new mode are highly welcome.

I think *_DIRECT_SCALARS or *_DIRECT_RGB would be more meaningful than *_NO_SCALARS since we do in fact use the scalars, just without a colormap.

	David


More information about the vtk-developers mailing list