[vtk-developers] Transparent LookupTables

Francois Bertel francois.bertel at kitware.com
Fri Nov 20 11:11:55 EST 2009


Hello John,

1) in int vtkActor::GetIsOpaque() , the very end check if the
LookupTable is Opaque or not. No need to tweak the actor opacity
anymore.
2) IsOpaque on the vtkLookupTable is going over all the entries to
check if it any value is not opaque, therefore I don't think your
local change will break anything. For an opacity ramp, I think
SetAlphaRange() is what you want (I'm not sure though)

Regards.

On Wed, Nov 18, 2009 at 9:13 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> Francois
>
>> vtkLookupTable::SetTableValue(vtkIdType indx, double r, double g,
>> double b, double a); allows to set the alpha value per table entry.
>
> Yes, thanks. I'm aware of this, but two questions
> 1) If you manually set an alpha value in the lookup table, then when the renderer needs to do back to front sorting, it used to ask "Are any actors transparent" to which they replied no unless you changed actor opacity to 0.99999. I added something to my local build to query the lookup tables as well and I think _you_ have put something in cvs proper which does this? Yes? If so, is it now safe to use transparent lookuptables without worries.
>
> 2) There is no mechanism within ParaView to select a standard ColourTable, and also tell it to use either the index (0-1) as the opacity or the luminance of the table RGB values as opacity. This is what I'd like to do, use standard tables, but vary the opacity.
> Within my local build I've added some tweaks to have the lut generated using opacity=ramp or luminance - but I'd like to know if there's an existing mechanism to do this. I can't really believe that in all these years, nobody has wanted to overlay a plot onto a map for example and have the map show through where the scalars are low. If I add such functionality to vtkLookuptable and also to paraview - will it break sorting/peeling etc etc
>
> JB
>
>
>>
>>
>> On Mon, Nov 16, 2009 at 7:12 AM, Biddiscombe, John A.
>> <biddisco at cscs.ch> wrote:
>> > vtkLookupTable does not directly support the handling of tables with
>> transparency which changes on a per item level.
>> >
>> > I recently added some tweaks to it to allow some pictures to be
>> generated (from paraview) which used an overlay of a dataset which had
>> transparent regions on top of a textured image. It looked very nice,
>> but I was very surprised that there is no native support for generating
>> a lookuptable with a luminance scaled opacity or other similar simple
>> opacity function.
>> >
>> > I used to do this quite a bit and found it very useful  (GIS stuff in
>> particular).
>> >
>> > Is there some other support for creating semi-transparent
>> datasets/images etc that I have not seen. Has anyone else worked on
>> this. When creating the original point sprite mapper, I had to make a
>> few changes to how the mappers decide if an actor has transparency or
>> not. Normaly they query the actor's opacity, but when it is 1.0 and the
>> lookup table has some, things broke. I know that Francois (or someone
>> else) recently added a native handling for this kind of check within
>> the rendering pipeline, so does support for transparent lookuptables
>> now exist too - and am I looking in the wrong place?
>> > Either way - is anyone else interested in this capability?
>> >
>> > JB
>> >
>> > --
>> > John Biddiscombe,                            email:biddisco @ cscs.ch
>> > http://www.cscs.ch/
>> > CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91)
>> 610.82.07
>> > Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91)
>> 610.82.82
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtk-developers
>> >
>> >
>>
>>
>>
>> --
>> François Bertel, PhD  | Kitware Inc. Suite 204
>> 1 (518) 371 3971 x113 | 28 Corporate Drive
>>                       | Clifton Park NY 12065, USA
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtk-developers mailing list