[vtk-developers] Scalar coloring modes and polygonal rendering

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Nov 12 12:42:46 EST 2014


Folks,

vtkPolyDataMapper since a long time supports two coloring modes, viz.
VTK_COLOR_MODE_DEFAULT and VTK_COLOR_MODE_MAP_SCALARS. MapScalars
indicates always use a vtkScalarsToColors instance to map data values
to colors. Default means only use the vtkScalarsToColors if the data
array is not an unsigned char array.

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? Also if any suggestions for the name for this
new mode are highly welcome.

Thanks
Utkarsh

[1] http://www.paraview.org/Bug/view.php?id=14943


More information about the vtk-developers mailing list