[vtkusers] Questions on vtkLookupTable, SetIndexedLookup in connection with graph display
I_like_activiz
martin.buerger at aon.at
Thu Dec 6 14:56:37 EST 2012
I think you should use vtkColorTransferFunction instead.
There you can add RGB values like:
AddRGBPoint(0, 1, 0, 0); // red
AddRGBPoint(1, 0, 0, 1); // blue
AddRGBPoint(2, 1, 1, 1); // white
and then you can query color values by:
GetColor(0) \\ 1,0,0
GetColor(1) \\ 0,0,1
GetColor(2) \\ 1,1,1
GetColor(-100) \\ 1,0,0
GetColor(100) \\ 1,1,1
GetColor(1.5) \\ 0.5, 0, 0.5
Values between two defined colors will be interpolated.
You could add a special color for each value below or above a certain
threshold e.g.
AddRGBPoint(-0.001, 0, 1, 0) //green for all values < -0,001
AddRGBPoint(2.001, 0, 1, 0) // green for all values > 2.001
--
View this message in context: http://vtk.1045678.n5.nabble.com/Questions-on-vtkLookupTable-SetIndexedLookup-in-connection-with-graph-display-tp5717456p5717474.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list