[vtkusers] coloring an isosurface with a second variable
Charles Boivin
Charles.Boivin at rwdiwest.com
Fri Oct 29 13:31:10 EDT 2004
Hi John,
I have been using vtkPolyDataMapper::SelectColorArray() to color an
isosurface with another variable. Seems to work pretty well for me.
Charles
>>> "John Clyne" <clyne at ucar.edu> 10/29/04 11:16am >>>
I'm trying to do what I would think would be a trivial operation but I
can't for for the life of me figure out how to do in vtk. I have an XML
data
file (.vts) that contains two scalar variables (temperature and
humidity).
I'd like to generate an isosurface of one and color it with the other.
Selecting the field to isosurface is easy enough:
vtkXMLStructuredGridReader reader
reader SetFileName $Datafile
reader Update
[[reader GetOutput] GetPointData] SetActiveScalars "humidity"
This selects the appropriate field for the isosurfacer, and if I do a
puts "[[mapper GetInput] Print"
I see both the temperature and humidity arrays named as "Point Data",
but
now I have no idea how to tell the mapper to map the temperature field
through the lookup table to assign color to the resulting geometry
coming
out of the vtkContour.
Any pointers would be greatly appreciated.
thanks!
John Clyne (clyne at ncar.ucar.edu)
National Center for Atmospheric Research
1850 Table Mesa Dr. Boulder, CO 80303 USA
1.303.497.1236
_______________________________________________
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://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list