[vtkusers] Help Needed with vtkCanvas/vtkPanel in JAVA

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu May 10 17:30:08 EDT 2012


Hi Satya,

when you run the sample code that is provided in vtk.jar
(vtk.sample.VTKCanvas), do you manage to rotate de different views ?
Or is the interaction is broken as well ?

Thanks,

Seb


On Thu, May 10, 2012 at 12:23 PM, satyanarayana reddy
<satyajanga at gmail.com> wrote:
> 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.
>
>



More information about the vtkusers mailing list