Java examples.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Java examples.

Andrew Maclean-3
I need the help of a Java expert here. I'm not!!!

We have been getting some Java examples in the VTK Examples which is really great. They work and run, however I have some concerns.


When you run this example, a frame is created containing a content pane and the arrow render window. Upon resizing,  the render window remains at the bottom left-hand side of the frame. I would have expected it to resize along with the frame.

In addition if you set up and use windowToImageFilter to write an image, the render window jumps out of the frame to the upper left of the display. 

Ok, so I thought to replace vtkPanel with vtkCanvas. Now resizing works perfectly, except writing an image causes a crash.

I have attached the modified Arrow.java so you can run it and see the issues. Play with commenting in/out vtkPanel and vtkCanvas.

Ideally I would like the usual resizing and scaling to work, which seems to when vtkCanvas is used. However writing an image is problematic when either vtkPanel or vtkCanvas is used.

I'm sure you Java experts have come across this and solved it!


Andrew

--
___________________________________________
Andrew J. P. Maclean

___________________________________________

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers


Arrow.java (4K) Download Attachment