[vtkusers] Obtaining vtkLookupTable break points

Phil Goddard philgoddard at telus.net
Sun Aug 10 19:20:52 EDT 2008


Is it possible to extract the "break" points from a vtkLookupTable?
I'm surprised there is no method for this (or at least not one that I can
see).

I have the following vtkLookupTable
lut->SetRange(limitMin,limitMax);
lut->SetNumberOfColors(nColours);
lut->SetRampToLinear();
lut->Build();

and I would like to know the values (between limitMin and limitMax) that it
has calculated for the changes in colour.

I know that since the ramp is linear I could find them myself by calculating
delta = (limitMax-limitMin)/nColours;
and using it appropriately.

But since the lookup table must have already done this, and to avoid the
potential of getting numbers that due to round off may be slightly different
to those used in the lookup table, I'd like to extract the ones from the
table.

Thanks
Phil.





More information about the vtkusers mailing list