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.

Re: Rendering an image

Hi Don,

> I'd like to be able to add an image to a VisAD display
> using the ScreenLockedRendererJ3D.  This might a logo,
> or a legend that is stored as a GIF or JPEG image.  I'd
> like to position it with ConstantMaps to the display
> axes.

I'm a little confused. Using ScreenLockedRendererJ3D will
fix the position of the image relative to the screen,
rather than the display axes. If your Data were a simple
geometry rather than an image, you could display it as a
Shape and use ConstantMaps to the XAxis, YAxis and ZAxis
will fix it relative to the axes. I think the only way to
fix an image relative to the axes is to use ScalarMapListeners
added to the spatial ScalarMaps, to listen for AUTO_SCALE
and MANUAAUTO_SCALEL ScalarMapEvents, and adjust the object
position and scale appropriately. Fortunately these events
do not generally vary frequently or continuously, so you
can probably just recompute a new domain Set for your
image FlatField. Each time you construct a new FlatField,
call its setSamples() method with copy = false so you can
reuse the same pixel array.

Good luck,
Bill


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