[vtkusers] Both layers don't show up when setting a background image
Bill Lorensen
bill.lorensen at gmail.com
Tue Aug 15 11:08:07 EDT 2017
Maybe this c++ example will help?
https://lorensen.github.io/VTKExamples/site/Cxx/Images/BackgroundImage/
Bill
On Tue, Aug 15, 2017 at 10:37 AM, Neel Patel 0-0-0
<siva.yedithi at gmail.com> wrote:
> 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.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list