[vtkusers] vtkLookUpTable transparency bug?

Kilgus, Thomas t.kilgus at Dkfz-Heidelberg.de
Fri Aug 12 03:42:22 EDT 2011


Hi Artem,

I don't if I get you right, but the pictures look correct. If you set the alpha value of something to 0, you will see the color of the stuff behind it. I guess in your case there is nothing behind it and that's why the background color can be seen?

Best regards
Thomas

-----Ursprüngliche Nachricht-----
Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Artem Babayan
Gesendet: Donnerstag, 11. August 2011 19:13
An: vtkusers at vtk.org
Betreff: [vtkusers] vtkLookUpTable transparency bug?

Hi,

I am trying to visualise a 2D scalar field as a 3D 'landscape'. Some of the numbers are just indicators of 'undefined' values, so I do not want to show them at all.

I set these 'undefined' numbers to the values which correspond to the first row of vtkLookUpTable and then assign this row 'transparent'
alpha=0:

     lut->SetTableValue(0, 0, 0, 0, 0);

However, there are 2 problems:

1) This results in 'background' color, not 'transparent' -- see second picture -- the transparent part actually closes some part of the graphics.
2) On one Unix system I haven't even got transparency -- the 'transparent' part was drawn in black color (as corresponds to the table value).

So am I doing something wrong here or is it a bug in vtkLookUpTable?

Also, may be there is a smarter way not to show 'undefined' values?

Best wishes
Artem



More information about the vtkusers mailing list