[vtk-developers] Scalars, Mappers and LookupTables

Blezek, Daniel J (CRD) blezek at crd.ge.com
Fri Oct 19 10:33:23 EDT 2001


Hi all,

  I've been quite confused over the interaction of vtkScalars, vtkMapper, and vtkLookupTable for a
while now.  When something confuses me twice, it usually means that it is non-obvious behavior and
motivates me to ask for clarification/change.

  This is the situation: during the rendering of a PolyData, I want to color the cells based on some
criteria.  The most obvious idea is to get the CellData, grab the Scalars, fill the scalars in, and
set a lookup table.  During rendering, the vtkPolyDataMapper by default overrides my lookup table
settings, causing the polydata to disappear from the rendering.  This has bitten me twice.

  I consider setting the LookupTable on the CellData scalars to be the more obvious way of
controlling the appearance of my data, and more specific than the mapper.  It's a very subtle bug to
figure out why the mapper keeps changing the range of my lookup table to 0.0->1.0, and took me a
couple of hours(and Jim Miller) the first time it happened, and motivated a note to the developer's
list the second time.  I don't like the default behavior, and would like to change it, but I'm
unaware of the impact, i.e. make vtkMapper::UseLookupTableScalarRangeOn() the default.

Comments?
-dan

--
Daniel Blezek, Ph.D.
blezek at crd.ge.com
Visualization and Computer Vision Lab, Imaging Technologies
GE Corporate Research & Development



More information about the vtk-developers mailing list