[vtkusers] How to reverse the colours to display contours.?

Joseph Melnyk JMelnyk at pile.com
Thu Feb 17 07:20:01 EST 2011


> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of rakesh patil
>
> Thanks. It works for default lookup table. Below is my code:
>
> In this case, I am unable to reverse the colous. Manually, i need to change the code to reverse i guess..
>
> Any idea how to get it done here.?

You've got the right approach.  Just let vtkLookupTable build, then loop through the colors, grabbing one from the end and one from the beginning and swapping them.  Then mark it as modified and you should be good to go.

I'd love to find a more efficient method.  I briefly tried the SetHueRange idea but it appears I'll need some adjustments to make it work.

__Scanned by MessageLabs



More information about the vtkusers mailing list