gishara
gishara

Reputation: 845

Add user options in VTK

I have a VTK object with different colors for each point according to the point value. I want to add options to allow the user to view the same object with different values, with different colors for each value. I am using a VTK ColorLookupTable for this.

For example, if the user selects pressure (from a set of options) the values of the object that are relevant to pressure will be shown with the colors.

Is this possible, to add options and change the values, with VTK?

Upvotes: 0

Views: 100

Answers (1)

David Doria
David Doria

Reputation: 10273

Sure, that is exactly what a vtkLookupTable is for.

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ColorLookupTable

You just need to use Set*Range (e.g. SetValueRange, etc.) to setup your new color scheme.

Upvotes: 3

Related Questions