Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690