[vtkusers] Both layers don't show up when setting a background image
Neel Patel 0-0-0
siva.yedithi at gmail.com
Tue Aug 15 10:37:56 EDT 2017
Hi All,
I have a question about setting a background image. When I set the
layers individually, as in only one layer is rendering it shows up fine, but
when I try to have both render only one layer shows up. I've followed the
background image example and have pretty much the same setup. I'm using WPF
and C# with Activiz for my application.
vtkImageActor actor1 = vtkImageActor.New();
actor1.SetInput(mapToColors);
vtkRenderer ren1 =
renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer();
ren1.ResetCamera();
ren1.SetLayer(0);
ren1.InteractiveOff();
ren1.AddActor(actor1);
vtkImageActor actor2 = vtkImageActor.New();
actor2.SetInput(mapToColors2);
vtkRenderer ren2 =
renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer();
ren2.ResetCamera();
ren2.SetLayer(1);
ren2.AddActor(actor2);
vtkRenderWindow renWin = renderWindowControl1.RenderWindow;
renWin.SetNumberOfLayers(2);
renWin.AddRenderer(ren1);
renWin.AddRenderer(ren2);
renWin.Render();
I'm not sure if it's because both my renderers point to the same window,
that it's only showing one or
if it might be something else. Any help would be appreciated. Thanks.
Regards,
Neel
--
View this message in context: http://vtk.1045678.n5.nabble.com/Both-layers-don-t-show-up-when-setting-a-background-image-tp5744411.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list