[vtkusers] Scalar data on polydata surface II
Nils H. Busch
nilsb at cns.mpg.de
Mon Mar 4 10:51:17 EST 2002
Hi,
thanks for the pointers. With vtk3.2, I figured vtkProbeFilter is the
thing to use. The mapping of scalar values to colors is then done in a
vtkPolyDataMapper with ScalarVisibilityOn.
However, since I am writing the output polydata to file with
vtkIVWriter, I probably can't use the vtkPolyDataMapper as suggested in
the example graphics/examplesTcl/combColorIso.tcl. The vtkIVWriter
creates its own instance to get the colors.
I could think of at least two ways to solve this. One would be to add a
ScalarVisibility flag to my vtkIVWriter and pass this information to the
internal vtkPolyDataMapper. I am not sure if this is according to the
vtk priniciples ? I think this would also require that vtkProbeFilter
somehow associates the scalar point data to the vtkPolyData data it
creates (there is a method called GetPolyDataOutput()). Does anyone know
how vtkProbeFilter does what it does and how it stores the scalar data
with the polydata ?(presumably in the vtkScalars instance of
vtkPointData ?)
The other would be to manually set up the mapping of scalars to color
via a lookup table and write the colors to the vtkPolyDataMapper::colors
member, if that is accessible (which I don't think is the case).
Are there any other ways to associate colors with the
vtkPointData::scalars ?
BTW, if I understood correctly, one of the changes between vtk3.2 and
4.0 is the way how additional point/cell data is stored. Would a switch
to vtk4.0 simplify things for me ?
--
Nils H. Busch
Max-Planck-Institute of Cognitive Neuroscience
phone: ++49 (341) 9940-335 fax: ++49 (341) 9940-204
e-mail: nilsb at cns.mpg.de
More information about the vtkusers
mailing list