[vtkusers] Transparency of binary segmentation mask

S, Navneeth (GE, Research) navneeth.s at ge.com
Tue Mar 24 12:07:22 EDT 2009


In the past I've solved issues with overlapping geometry (polygon
dithering in OpenGL ?)
Using the following vtk call:

vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();

Check if it works for you. You should make this call before the render
pass.

-navneeth

>It looks like the images are displayed at exactly the same location? I
>believe the image mapper maps a texture to a quad, so perhaps you have
>conflicting geometry. The other thing I would try is to set the
>opacity of both images to less than 1.0 (like 0.9 and 0.5), so that
>they are both rendered in the same render pass. VTK first renders any
>opaque geometry, then renders translucent geometry, so that may be why
>it gets obscured.

>Jeff

On Mon, Mar 23, 2009 at 9:38 PM, Charlotte Curtis <c.f.curtis at gmail.com>
wrote:
>> Hi all,
>>
>> I've got a couple of images displayed on top of each other, one a 2D
>> medical image, and the other a binary segmentation mask. ?They each
>> have their own image actors and renderers, and I created a lookup
>> table for the segmentation mask in the hopes that it would let me
>> render the mask as semi-transparent colours. ?Right now I've got two
>> values in the LUT (corresponding to the image values of 0 and 1), and
>> I can change the colours, but the transparency is binary - if I set
>> the alpha value to 0, it doesn't display, but if it's anything else
>> (even 0.001) then the mask is completely opaque.
>
>> I've also tried changing the opacity of the actor
>> (actor->GetProperty->SetOpacity()), but this doesn't seem to do
>> anything, although when I print out the value of the actor's opacity
>> it thinks that it is set correctly.
>>
>> Perhaps my window/levels are wrong? ?I'm kind of at a loss.
?Apologies
>> if this has been asked (seems like a common problem, but I couldn't
>> find a solution so far). ?Thanks,
>>
>> Charlott



More information about the vtkusers mailing list