NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
I create a DisplayImplJ2D, add scalar maps, then add some data. I then always call
BufferedImage bi = displayImplJ2D.getImage( true ); I note that in certain situations this call hangs.I note that the 'true' parameter forces a retransformation and redraw of the 'scene'. If I experiment with a false value, it can lead incomplete graphics, ie Data objects not yet drawn.
This lack of understanding of the thread model has been my most frustrating bugbear using Visad. As I see it, I will have one thread per DisplayImpl (since the VisADCanvasJ2D created for each display starts its own thread), plus 5 threads in the ThreadPool. Are there any others ? Should I be using more calls to disableAction/enableAction and trying to coordinate a 'finished image' by listening for DisplayEvents of type FRAME_DONE?
On a somewhat related note, I am better off using one DisplayImpl object, at least one per 'user' (== user agent) and then toggling 'layers' of data on and off using DataRenderers so that I get an image containing just one Data object drawn, or should I use a separate DisplayImp object for each Data object (examples of Data for my app are coastline, bathymetry contours, model grid contours, etc)
I am trying to build a browser based UI system with visad producing BufferedImages on the server which I then convert to gif/png for browser consumption. If I can only track down/understand the fail-safe method for producing the BufferedImage objects.
I am tempted to hack the ThreadPool to create just one thread and see how that goes.
Any help very gratefully appreciated. Stuart ============================================================================== To unsubscribe visad, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ==============================================================================
visad
archives: