Color for 2D Mapper

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Color for 2D Mapper

VTK - Users mailing list

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

 


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

polydata.py (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Color for 2D Mapper

VTK - Users mailing list

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" <[hidden email]>
Date: Wednesday, May 15, 2019 at 10:36 PM
To: Cory Quammen via vtkusers <[hidden email]>
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

 


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

polydata.py (2K) Download Attachment