Re: serialize a 3 d dispaly

"Campbell, Garrett" wrote:
> 
> I have constructed a nice 3 d display with jython and visad.
> This takes considerable CPU time to construct.
> 
> Is there a simple way to capture the 3d display for later viewing?
> 
> I guess I could serialize the data objects and reconstruct the display
> by reading them back in, but I wondered if there is some short cut
> command to do this quickly.

As Mathias and Tom pointed out, you can capture the image
as a BufferedImage or as a JPEG file.

A slick way to move images from a DisplayImpl on one
machine to a RemoteSlaveDisplayImpl on another machine
is illustrated in visad/examples/Test64.java (client)
and Test63.java (server). This allows mouse interactions
on the client machine to be aplied to the original
display on the server machine.

As you point out, you can also send the original data
between machines and attach it to a new DisplayImpl.

The intermediate level, the Java3D scene graph, is not
Serializable. But VisAD has its own internal scene graph
classes that are Serializable. These are used by
DisplayImplJ2D. Also, a DisplayImplJ3D creates a Serializable
internal scene graph first, then converts it to a Java3D
scene graph. The visad.cluster package uses this with
custom Java3D DataRenderers that create Serializable
internal scene graphs on cluster nodes, send them to a
client, where they are merged and converted to a Java3D
scene graph. But custom DataRenderers are a little deep
for what you want to do.

I think the RemoteSlaveDisplayImpl, or the JPEG file, is
the right approach for your problem.

Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: