[vtkusers] vtkImageActor layers/bring to front?
Karthik Krishnan
karthik.krishnan at kitware.com
Mon Feb 14 09:00:59 EST 2011
If the two images are at the same location in space, it seems like you
should blend the two images (vtkImageBlend) and then display it.
If they are at different depths, you can achieve transparency either by
setting the opacity on both or on the actor closer to the camera to be
non-zero.
Alternatively to achieve transparency on selected regions of an image, you
can give it RGBA or LA (2 or 4 component) data. The last component will be
treated as alpha value for the pixel.
I would suggest that you dither one of the images by a small amount.
On Mon, Feb 14, 2011 at 7:16 PM, David Doria <daviddoria at gmail.com> wrote:
> Is there any concept of priority or "front" with vtkImageActor?
>
> Say for example I have two vtkImageActor's (2D) both with some transparency
> and I want to switch which one is "on top". Is there a way to do this
> without actually translating one of the images perpendicular to the camera?
> That is, if both images occupy the same space (the Z=0 plane for example),
> how do you determine which one is visible?
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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/20110214/2b00ada0/attachment.htm>
More information about the vtkusers
mailing list