[vtkusers] Superimposing images

David.Pont at ensisjv.com David.Pont at ensisjv.com
Wed Jun 7 16:55:27 EDT 2006


"Diego R. Medaglia" <diegomedaglia at terra.com.br> wrote on 07/06/2006
14:04:11:

> Hi everybody!
>     I'm trying to superimpose two images, with the original in the
> background and the other being the result of a segmentation done
> with ITK on the original one.
>     As it is a segmentation, there's lots of black pixels, that will
> hide the image behind it (the original one). I'm trying to do the
> whole thing by defining an actor out of each image and adding them
> to the same renderer, and then setting the color and opacity of the
> result image(the actor) so that i'm still able to see the original
> one behind it, but without any success.
>     Is there any way of NOT SHOWING the completely dark pixels i.e.
> setting the opacity of color (0,0,0) to 0? That would solve the
> problem, wouldn't it?

I'm not sure what kind of data your 'images' are or how you are rendering
them but I have done this sort of thing with geometrical data using
SetTableValue calls for a vtkLookupTable and specifying opacity=0 for the
values to become transparent. If you have image data you could set alpha
values directly?

  Dave P

>     Any other ways of getting around this situation is also welcome.
>
>     Thank you all,
>
>                                 Diego
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060608/271e9519/attachment.htm>


More information about the vtkusers mailing list