[vtkusers] Colour mapping based on coordinate index

Stefan Riha hoitaus at gmail.com
Fri Jan 5 12:34:45 EST 2007


Hi!

How can I get the mapper not to colour based on scalar values, but
based on the k index of the point the scalar is defined on? How can I
do this efficiently? (Instead of defining a lookuptable that maps
every scalar to a colour)

I have a Structured Points set with dimensions (100, 100, 40) and a
scalar on every point. The scalar will be used to do  WarpScalar for
every i-j hyperplane taking k as constant. So I will have 40 surfaces
that can be parametrized with i,j.
The Problem is that I want to colour the 40 surfaces in 40 different
colours and I don't want to do this by hand.


I can extract the i,j planes with ImageDataGeometryFilter, create
different mappers and actors and give them different colours. That's
too much work.

I can extract the i,j planes with ImageDataGeometryFilter and then use
AppendPolyData, but how do I tell the mapper to NOT colour based on
scalar values, but based on the k index of the point the scalar is
defined on.

Thanks, stefan



More information about the vtkusers mailing list