[vtk-developers] Java question

Jeff Lee jeff at cdnorthamerica.com
Fri Aug 2 13:36:40 EDT 2002


Blezek, Daniel J (Research) wrote:

>Hi all,
>
>  To Java-VTK developers out there.  I ported the ImagePlaneWidget.tcl code to Java (included), just
>to poke around.  These are the things I found:
>
>- if you do not make a vtkPanel object first, the dynamic vtk*Java.so libraries are not loaded
>
yes, since vtkPanel.java automatically loads them in a static block. 
 you could do this anywhere.

>- Hybrid was not included in the list of loaded native libraries, likely because it's optional (could
>be caught in the code)
>
I don't see how it can be caught because you can't query the jvm for a 
list of the loaded native libs as far as I know.

>- When I add the interactor, I get two windows.  One is the Swing/vtkPanel window, and the other
>looks like a VTK OpenGL window.  This is really funny, and not expected.  Without the interactor, I
>get one window (but the image plane widget doesn't work).
>
I am about to release a new vtkPanel which has a 
vtkGenericRenderWindowInteractor.  With this new one you can set 
interactor styles and add 3d widgets.  In your case, the interactor is 
opening its own window.  If you can't wait, you basically need to map 
all the mouse/key events to calls to vtkGenericRenderWindowInteractor. 
 The timer events are a little more tricky though.  I have a working 
version, but I haven't had the time to spruce it up into a production 
version.  I'll try to get it done asap though, as it seems like a useful 
thing.

-Jeff

>
>Does anyone have some ideas what's going on?  I modified the ImagePlaneWidget.tcl example to use a
>vtkTKRenderWidget (the TCL version of vtkPanel), and it does the right thing (also included).
>
>Thanks,
>-dan <<ImagePlaneWidget.tcl>>  <<ImagePlaneWidget.java>> 
>
>--
>Daniel Blezek, Ph.D.
>blezek at crd.ge.com
>Visualization and Computer Vision Lab, Imaging Technologies
>GE Global Research Center
>
>
>  
>
>_______________________________________________
>vtk-developers mailing list
>vtk-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>  
>

-- 
Jeff Lee <jeff at cdnorthamerica.com>
Software Engineer
CD North America
21 Lafayette Street, Suite 230
Lebanon, NH 03766
Tel:    (603) 643-9993 ext. 109
Fax:    (603) 643-9994





More information about the vtk-developers mailing list