VTK & Java info rqst
Audrius Stundzia
adv_biologic at excite.com
Fri Jul 2 10:53:13 EDT 1999
Hi Igor,
Back from celebrating Canada Day up here.
I once developed a vtk/Java/Swing application which sounds similar to what
your
trying to do. As vtkPanel is a "heavyweight" (Java AWT) class, I wasn't
able
to use it in JInternalFrame - a "lightweight" (Swing) class. I found the
following guide useful:
http://java.sun.com/products/jfc/tsc/archive/tech_topics_arch/mixing/mixing.
html
I ended up using embedded JSplitPanes (giving 4 panes in my application) and
was able to insert a heavyweight vtkPanel rendering window into each one.
Each
rendering window was spun off as a seperate thread. This worked quite well.
In my current application, I've used pure Swing to create a GUI panel.
A seperate thread (my extension of the SwingWorker thread) executes a
series of JNI methods to load the data and execute a series of (C++) vtk
graphics pipelines. So while the GUI is pure Swing, the rendering windows
are a set of X windows as I'm working on a unix machine. I'm
not sure this is what you want. My current challenge,
as you may have noticed from my posting, is to spin of each of the
interactors
for the pipelines as a seperate thread in the vtk/C++ enviroment. Since
threading is not an intrinsic part of the C++ specification, this ends
up being much more complicated than in Java. The vtk group, to their credit,
are doing a lot of work to simplify the process.
Hope this info is of some help.
Best regards,
Audrius
On Thu, 1 Jul 1999 12:10:44 -0400 (EDT), Igor Fridman wrote:
> Audrius --
> Hello, this is a reply to your message on the VTK users list. I
> would be interested in knowing what you have been able to make with the
> set of JNI calls that you mentioned. I'm currently working on an
> application in which I would like to open several render windows (as
> JInternalFrame), but am struggling to find a way to use vtkPanel or find
a
> replacement for it. Any help would be much appreciated.
>
>
> ---------------------------------
> As a javaphile, I've been somewhat frustrated by the Tcl-centric
> nature of vtk, and the problems with vtkPanel w.r.t. Swing,
> so I'll second Igor's Java question.
>
> One (heretical) approach I've used is to write a GUI in pure Java/Swing
> and
> have a simple set of JNI (Java Native Interface) calls to execute the vtk
> graphics C++ pipeline in a seperate thread.
>
> It's a bit like making sausages. It's not pretty,
> but the result can be surprisingly good :)
>
> Regards,
>
> Audrius
>
> On Mon, 28 Jun 1999 16:02:17 -0700 (PDT), Igor Fridman wrote:
>
> > This is a followup question to the one I asked
> > previously.
> >
> > What is the future of VTK and Java? Since the current
> > widget for displaying a render window in java,
> > vtkPanel, appears to be exploiting a "loophole" in
> > java architecture, is there any hope to making a
> > render widget which will be fully compatible in the
> > java environment?
> >
> > Has anyone atempted making a replacement for vtkPanel?
> >
> > BTW: Magician, the OpenGL implementation for Java is
> > now free for development of open source software,
> > available here:
> >
> > http://www.arcana.co.uk/products/magician/
> >
> >
> > ===
> > ==================================================
> > Igor Fridman
> >
> > Naval Research Laboratory
> > Vacuum Electronics Branch Code 6841
> > 4555 Overlook Ave. S.W., Washington, DC 20375, USA
> > ==================================================
>
_______________________________________________________
Get your free, private email at http://mail.excite.com/
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list