[vtkusers] coloring an isosurface with a second variable
John Clyne
clyne at ucar.edu
Fri Oct 29 14:23:03 EDT 2004
Charles, this shows my ignorance of vtk, but it looks like SelectColorArray
can be used when you have "Field" data. the vtkXMLStructureGridReader loads
the scalar data as "Point" data. I don't really understand the difference
between Point and Field data, nor how you might convert one to the other.
Any insight here?
Thanks for your quick response, Charlse.
cheers - jc
----- Original Message -----
From: "Charles Boivin" <Charles.Boivin at rwdiwest.com>
To: <clyne at ucar.edu>; <vtkusers at vtk.org>
Sent: Friday, October 29, 2004 11:31 AM
Subject: Re: [vtkusers] coloring an isosurface with a second variable
> 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