[vtkusers] vtkLookupTable Transpacency == background color?

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Fri Apr 19 18:14:53 EDT 2002


Its been a while since I played with this, but isn't the call to Build
unnecessary. If you call Build it'll build it'll overwite the values from
its own computation (based on HSV values). If you stuff data in yourself,
then don't call it.

JB

----- Original Message -----
From: "Chris Want" <cwant at ualberta.ca>
To: <vtkusers at public.kitware.com>
Sent: Friday, April 19, 2002 9:30 PM
Subject: [vtkusers] vtkLookupTable Transpacency == background color?


> Hi all,
>
> I would like to use a lookup table that is red and varies
> in opacity. I am using code to generate the lookup table
> that looks like this:
>
>      lut = vtkLookupTable()
>      lut.SetNumberOfColors(256)
>      for i in range(256):
>          lut.SetTableValue(i, 1.0, 0.0, 0.0, float(i)/255.0)
>      lut.Build()
>
> When I use this lookup table the rendered object varies in color
> between red and the background color of the renderer instead of
> varying between red and transparent. I get similar results when I try to
> set the transparency using lut.SetAlphaRange(0.0, 1.0). When I set a
> solid transparency using actor.GetProperty().SetOpacity() I get the
> transparency I would expect.
>
> Is there something else that I have to set on the mapper or on the
> vtkProperty of the actor to get this variation in opacity to work?
>
> (platform linux+nvidia,
> vtk version 4.x from the vtkNightlySrc.tar.gz on 2002-03-06)
>
> Thanks,
>
> Chris Want
> Research Computing Support
> Computing & Network Services
> University of Alberta
> Tel: 1-780-492-9418
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list