[vtkusers] VTK equivalent of Paraview SetInterpolateColorsFlag
Bruno da Silva de Oliveira
bruno at esss.com.br
Thu Sep 15 11:15:53 EDT 2005
Hi Paul,
Paul Cochrane wrote:
>Thanks for that Francois! It looks like it's the right thing to use,
>unfortunately, I'm restricted a bit to vtk version 4.2. Maybe one can't do
>that within that version of vtk...
>
>
We also use vtk-4.2, and I implemented rendering with texture... until I
learned that this works out of the box in vtk-5.0 ;)
First you have to normalize the scalars and put them as the 's' values
of the texture coordinates (t can be set to 0). Next, you have to
generate a 1D texture of the lookup table you would like to use and set
that as the actor's texture. Finally, turn off the scalar coloring of
the mapper.
I implemented filters to do the first two steps, vtkScalarsToTCoords (to
generate the texture coordiantes) and vtkLookupTableToImage (to generate
the texture)... I can send you the source code, but it is implemented in
Python. :)
HTH,
--
Bruno da Silva de Oliveira
bruno at esss.com.br
ESSS - Engineering Simulation and Scientific Software
http://www.esss.com.br
More information about the vtkusers
mailing list