[vtkusers] coloring an isosurface with a second variable

John Clyne clyne at ucar.edu
Fri Oct 29 13:16:21 EDT 2004


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




More information about the vtkusers mailing list