[vtkusers] vtkImageActor layers/bring to front?

David Doria daviddoria at gmail.com
Mon Feb 14 09:21:24 EST 2011


>
> Hi David,
>
> It is possible to do what you are asking with vtkActors (i.e. by using a
> vtkPlaneSource as the data and a vtkTexture with the the image), by
> changing the order with which the two actors are added to the
> renderer.  It does not make it convenient to switch them, but it makes
> it possible.
>
> For vtkImageActor, though, the way that the depth buffer checks are
> done seems to be different, and AFAIK doing an offset or using
> vtkImageBlend like Karthik says are the best approaches.
>
> Note that with either vtkActor or with vtkImageActor, you must set
> the opacity to slightly below 1.0 (e.g SetOpacity(0.995) in order to get
> VTK to turn on the alpha-blending in OpenGL.
>
>  - David
>

In a simple demo without any transparency, it seems to behave as John
suggested, where the last image to be added takes precedence (the "top"):

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ImageOrder

Thanks for all of the quick information - I'll play around with it.
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ImageOrder>
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110214/6cdafbe7/attachment.htm>


More information about the vtkusers mailing list