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 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 J. P. Maclean


Powered by

Visit other Kitware open-source projects at

Search the list archives at:

Follow this link to subscribe/unsubscribe: (4K) Download Attachment