[vtkusers] Colour a triangle
Will Schroeder
will.schroeder at kitware.com
Mon Nov 11 07:55:40 EST 2002
When you use float data, then the data is mapped through the lookup table
and you should set the scalar range on the vtkMapper (or subclass such
vtkPolyDataMapper). It's likely you're data was being clamped in the range
(0,1) hence you were getting nothing but read and blue. When you use
unsigned char data, the mapper assumes that the data is color data and does
not map it through the lookup table (unless you set the appropriate
override flag).
Will
At 06:54 PM 11/11/2002 +0900, Naoko TAKAYA wrote:
>Dear VTK-users,
>
>I've just solved the problem... sorry... ;-)
>
>But just one more thing.
>
>I changed the vtkFloatScalars to vtkUnsignedCharScalars to
>solve the problem, but why does vtkUnsignedCharScalars work
>and not vtkFloatScalars. although the coordinates are in
>float ?
William J. Schroeder, Ph.D
Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065
will.schroeder at kitware.com
1-518-371-3971 x102
1-518-371-3971 (fax)
More information about the vtkusers
mailing list