[vtkusers] Cell Data for Colors

Amy Henderson amy.henderson at kitware.com
Fri Dec 1 08:51:43 EST 2000


Kent,

Have you tried vtkPolyDataMapper->SetScalarModeToUseCellData()? The mapper 
defaults to using point data, so you need explicitly set it to use cell 
data instead.

Amy

At 04:36 PM 11/30/2000 -0600, Kent Eschenberg wrote:
>Using VTK 3.1 (11/22/2000) on an SGI Onyx (IRIX 6.5.9m), a C++ program
>produces a drawing with no colors (only gray) using unstructured cells
>with scalar integer cell data and no point data:
>
>    vtkUnstructuredGrid
>    ->vtkGeometryFilter
>    ->vtkTriangleFilter
>    ->vtkPolyDataNormals
>    ->vtkPolyDataMapper
>    ->vtkActor
>    ->vtkRenderer
>    ->vtkRenderWindow
>
>The data object seems correct since I see a drawing with colors after
>inserting a conversion from cell to point data:
>
>    vtkUnstructuredGrid
>    ->vtkGeometryFilter
>    ->vtkCellDataToPointData  NEW
>    ->vtkTriangleFilter
>    ->vtkPolyDataNormals
>    ->vtkPolyDataMapper
>    ->vtkActor
>    ->vtkRenderer
>    ->vtkRenderWindow
>
>
>Am I doing something wrong or is the use of cell data for setting colors
>not yet available? Thanks in advance for any advice!
>
>Kent Eschenberg
>ERDC MSRC (DoD supercomputer center), Vicksburg, MS
>kee at athena.wes.army.mil
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list