[vtkusers] Help Needed with vtkCanvas/vtkPanel in JAVA

satyanarayana reddy satyajanga at gmail.com
Thu May 10 12:23:55 EDT 2012


Hi Seb,
        Thanks for the quick reply. The interaction is not at all happening
with vtkCanvas i.e. image is static in vtkCanvas. and the interaction is
happening nicely with vtkPanel. I want to use vtkCanvas so that I can have
more control on interactor.

Thanks,
Satya

On Thu, May 10, 2012 at 10:24 AM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:

> Hi Satya,
>
> can you be clearer when you say that the interaction is not working
> with vtkCanvas ?
>
> Do you mean that some interaction are happening but it is basically
> not what you are expecting ?
> Could you be more precise on what you would expect and what you get
> with your code sample ?
>
> Thanks,
>
> Seb
>
> On Thu, May 10, 2012 at 10:13 AM, satyanarayana reddy
> <satyajanga at gmail.com> wrote:
> > Hi All,
> >         I am facing a problem when trying to work with vtkCanvas. i.e.
> > interaction is not working with vtkCanvas and the same is working for
> > vtkPanel.
> > I am pasting the simple block of code here. Please help me to find out
> the
> > bug.
> >
> > Code For vtkPanel // Interaction is working perfectly fine
> >         vtkImageActor imageActor = new vtkImageActor();
> >         imageActor.SetInput(color.GetOutput());
> >
> >         panel.GetRenderer().AddActor(imageActor);
> >
> >         panel.GetRenderer().ResetCamera();
> >         add(panel,BorderLayout.CENTER);
> >
> > Code For vtkCanvas // Image is displaying Properly and interaction not
> > working
> >
> >         vtkImageActor imageActor = new vtkImageActor();
> >         imageActor.SetInput(color.GetOutput());
> >
> >         canavs.GetRenderer().AddActor(imageActor);
> >
> >         canvas.GetRenderer().ResetCamera();
> >         canvas.setInteractorStyle(new vtkInteractorStyleImage());
> >         add(canvas,BorderLayout.CENTER);
> >
> >
> > Thank you.
> >
> > Best Regards,
> > Satya.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120510/9b43658a/attachment.htm>


More information about the vtkusers mailing list