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

rakesh patil prakeshofficial at gmail.com
Thu Feb 17 22:56:10 EST 2011


Yes Joseph. I also personally feel there should be some efficient way to
implement this. Anyhow, everytime, looping will make app run slower (in
worst case where number of colours are more)

Anyone has any other solution for this?
On Thu, Feb 17, 2011 at 5:50 PM, Joseph Melnyk <JMelnyk at pile.com> wrote:

> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110218/dca76a86/attachment.htm>


More information about the vtkusers mailing list