[vtkusers] Obtaining vtkLookupTable break points

David Gobbi david.gobbi at gmail.com
Sun Aug 10 20:34:03 EDT 2008


Hi Phil,

Are you sure that neither the GetIndex(double value) won't provide you
with what you need?  If you look at the vtkLookupTable source code,
you'll see that it doesn't compute any "break" points.  It uses a
double-to-int cast to get the lookup index.

   David


On Sun, Aug 10, 2008 at 7:20 PM, Phil Goddard <philgoddard at telus.net> wrote:
>
> 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.
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list