[vtkusers] Re: Superimposing images

Goodwin Lawlor goodwin.lawlor at ucd.ie
Wed Jun 7 18:29:42 EDT 2006

Diego R. Medaglia wrote:
> 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?
>     Any other ways of getting around this situation is also welcome.
>     Thank you all,
>                                 Diego

Hi Diego,

There was an example (frogSlice.tcl) of this in an old version of VTK... 
  a google search throws it up here: 



More information about the vtkusers mailing list