[vtkusers] How to display multiple slices in one 3D scene?

David Gobbi david.gobbi at gmail.com
Tue Aug 26 10:16:40 EDT 2014


Hi Lin,

In VTK, you cannot use the same image actor in more than one renderer.
You will need to make three new actors for the ortho view.

 - David


On Tue, Aug 26, 2014 at 12:59 AM, Lin M <majcjc at gmail.com> wrote:
> Hi all,
>
> I try to make a simple viewer consists of 4 views. Axial, Sagital, Coronal
> and a 3D view contains the previous 3 slices. I use 4 renderwindows and the
> slice viewer works fine but when I try to make them display in the 3D
> viewer, it cannot show correctly.
>
> m_3DImgRenderer->AddViewProp(m_AxialImgViewer->GetImageActor());
> m_3DImgRenderer->AddViewProp(m_SagitalImgViewer->GetImageActor());
> m_3DImgRenderer->AddViewProp(m_CoronalImgViewer->GetImageActor());
> m_3DImgRenderer->ResetCamera();
> m_3DViewer->GetRenderWindow()->Render();
>
> I hope to display the 3 orthogonal slices in the 3D render window but it
> display 3 orthogonal slices of one plane. (I mean it should be 1 axial view,
> 1 sagital view and 1 coronal view but it displays like 3 axial in
> orthogonal...)
>
> Any ideas about that? Thank you!
>
> Best,
> Lin


More information about the vtkusers mailing list