[vtkusers] Problem with vtkLookupTable

Panagiotis Foteinos pafotein at gmail.com
Fri Mar 9 21:28:34 EST 2012


Hello.

I use vtkLookupTable for automatic generation of colors. So what I do
is the following:

// lut specification
**********
lut->SetNumberOfTableValues(3);
lut->SetHueRange(0, 0.833); //red to pink
lut->Build();
**********

and then, I map "my integer values" of range {0, 1, 2} to a color
scalar as follows:
**********
scalars->InsertNextTuple1(value/3)
**********

Finally, I pass the lut and scalars as data to an unstructured grid.


The problem is that I only get 2 colors (although, "my values" cover
all the range ). I have to specify (4) NumberOfTableValues in order to
make it wok properly.

Do you have any idea why?


Best Regards,
Panagiotis Foteinos



More information about the vtkusers mailing list