Re: Generating animation


Bill Hibbard wrote:
> 
> "axon@xxxxxxxxxxxxxxxx" wrote:
> >
> > I have a problem with generating animation's images. When I try to save
> > images from display by captureDisplay method it, some times, results with
> > withe box only (or "please wait ..."). Is there any method to check when the
> > display is fully rendered?
> 
> I don't know anything about the captureDisplay method,
> but try this instead:
> 
>   DisplayImpl display = ...
>   . . .
>   BufferedImage image = display.getImage(true);
>

visad.util.captureDisplay(Display, name) just calls
display.getImage() which does not make sure the entire
display is rerendered.  Using the display.getImage(true)
will ensure that the image is completely rendered, but
also has the added overhead of rerendering the entire display.
For a complex display (many scalarmaps and views of data), this
is time consuming (but it does work).  Perhaps we need a 
captureImage(Display, String, boolean) to allow an easy
interface to the display.getImage(boolean) method.

To answer your second question, there is no easy way to determine
when a frame is done.  DisplayImpl.Syncher does this, but it 
has to rerender the entire display.  Sure would be nice to have
an easy way to determine when the "Please wait..." message 
disappears (i.e. the display is done transforming).  Watching
for FRAME_DONE events or TRANSFORM_DONE events does not ensure
that the Display is "DONE".  For any given display, you may get
multiples of these events.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************