[vtkusers] Another question on vtkLookupTable..!

rakesh patil prakeshofficial at gmail.com
Tue Feb 22 00:35:33 EST 2011


Hello,

I have to display contours, for a given range, by mapping values to colours.
i.e. Consider I need to display contours between 1 and 200.

I use the lookuptable as follows

vtkSmartPointer<vtkLookupTable> lut =
vtkSmartPointer<vtkLookupTable>::New();
lut->SetNumberOfTableValues(9);
lut->SetTableValue(0, 1.00, 0.00, 0.00);
lut->SetTableValue(1, 1.00, 0.50, 0.00);
lut->SetTableValue(2, 1.00, 1.00, 0.00);
lut->SetTableValue(3, 0.50, 1.00, 0.00);
lut->SetTableValue(4, 0.00, 1.00, 0.00);
lut->SetTableValue(5, 0.00, 1.00, 0.50);
lut->SetTableValue(6, 0.00, 1.00, 1.00);
lut->SetTableValue(7, 0.00, 0.50, 1.00);
lut->SetTableValue(8, 0.00, 0.00, 1.00);
lut->Build();

Now suppose I want the output like show below

01 - 10     ==== (1.0, 0.0, 0.0)
11 - 20     ==== (1.0, 0.5, 0.0)
21 - 30     ==== (1.0, 1.0, 0.0)
31 - 40     ==== (0.5, 1.0, 0.0)
41 - 50     ==== (0.0, 1.0, 0.0)
51 - 60     ==== (0.0, 1.0, 0.5)
61 - 80     ==== (0.0, 1.0, 1.0)
81 - 100    ==== (0.0, 0.5, 1.0)
101 - 200  ==== (0.0, 0.0, 1.0)

How can this be done.?? So that the values supplied should be mapped to the
corresponding colour and should be displayed.

Thanks

Regards
Rakesh Patil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110222/a7651e45/attachment.htm>


More information about the vtkusers mailing list