[vtkusers] Color for 2D Mapper

Andrew E. Slaughter andrew.slaughter at inl.gov
Fri May 17 17:57:47 EDT 2019


I was able to get my example working by using the attached script, the trick was using SetScalarModeToUseCellFieldData rather than SetScalarModeToUseCellData, I don’t understand the difference but it works.

From: "Andrew E. Slaughter" <andrew.slaughter at inl.gov>
Date: Wednesday, May 15, 2019 at 10:36 PM
To: Cory Quammen via vtkusers <vtkusers at vtk.org>
Subject: Color for 2D Mapper

I am attempting to create a script (attached) that has two quads, one on top of the other, within a 2D mapper. I would like to color the quads based on a lookup table using the cell data, but cannot get the colors to show up. I would appreciate help getting this simple script working. I am using VTK 7.1 on MacOS.

Thanks,
Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190517/ccbe82e9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polydata.py
Type: text/x-python-script
Size: 1525 bytes
Desc: polydata.py
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190517/ccbe82e9/attachment.bin>


More information about the vtkusers mailing list