[vtk-developers] Scalar coloring modes and polygonal rendering
Dan Lipsa
dan.lipsa at kitware.com
Fri Dec 12 17:35:11 EST 2014
Hi all,
We have completed the implementation of a new mode for mapping
scalars to colors for vtkPolyDataMapper (and related classes):
VTK_COLOR_MODE_DIRECT_SCALARS.
If VTK_COLOR_MODE_DIRECT_SCALARS is set, then all arrays types
are treated as colors (integer types are clamped in the range 0-255,
floating point arrays are clamped in the range 0.0-1.0).
Contrast this mode with the traditional VTK modes:
VTK_COLOR_MODE_DEFAULT: only unsigned char
data arrays are treated as colors (and converted to RGBA if
necessary) all other types are mapped the the color map
VTK_COLOR_MODE_MAP_SCALARS: all arrays are mapped through the color map.
See
http://review.source.kitware.com/#/t/5022/
For details of the implementation and classes affected.
Dan
---------- Forwarded message ----------
From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
Date: Wed, Nov 12, 2014 at 12:42 PM
Subject: Scalar coloring modes and polygonal rendering
To: "vtk-developers at vtk.org" <vtk-developers at vtk.org>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20141212/a48ae505/attachment.html>
More information about the vtk-developers
mailing list