[vtkusers] Re: Display a 2D image beside a 3D object

Goodwin Lawlor goodwin.lawlor at ucd.ie
Wed Mar 23 13:00:35 EST 2005


Hi Jean-Michel,

You can use two vtkRenderers in separate half of the render window- one to
handle the vtkImageActor and one to handle the 3D object.

For example:


vtkImageActor actor2D
vtkActor actor3D

vtkRenderer ren2D
    #just the left half of render window
    ren2D SetViewport 0 0 0.5 1
    ren2D AddActor2D actor2D
vtkRenderer ren3D
    #just the right half of render window
    ren3D SetViewport 0.5 0 1 1
    ren3D AddActor actor3D

vtkRenderWindow renWin
    renWin AddRenderer ren2D
    renWin AddRenderer ren3D


hth

Goodwin


<jean-michel.rouet at philips.com> wrote in message
news:OF74B13035.FA4370C4-ONC1256FCD.005020AD-C1256FCD.0050C742 at philips.com...
> Hi all,
>
> I was wondering how I could split a renderwindow into 2 viewports, having
> the left side display a 3D object (polydata), and the right side display a
> 2D image whose content might change of course.
>
> I'm able to do that almost, by using a vtkImageActor on the right side,
> but unfortunately, the camera does not stay still when one click with the
> mouse.
> So 2 questions:
>         is that possible to disable camera movements on the right side
> viewport?
>         Is there a better vtk class for displaying a 2D image in a
> viewport, other than vtkImageActor?
>
>
> JM
>
>
> _______________________________________________
> 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
>






More information about the vtkusers mailing list