Re: Rendering an image

Hi Don,

> . . .
> > 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.
>
> Okay, let's try this again.  I have an image.  If I read
> it in as a FlatField, then I'd have something like
> (Element, Line) -> (R, G, B).  What I don't want to do
> is have to render it in the normal way (i.e, map element
> and line to axes and r,g,b to their corresponding display
> types), but rather was hoping that I could generate a
> geometry, that I could then position in the display.
>
> I figured eventually, VisAD must make some sort of geometry
> out of the image to put it in the display based on the
> scalarmaps.  I was just wondering if I could go from
> image -> geometry and then use the ScreenLockedRenderer
> to put it somewhere in the display.

VisAD does make a geometry for an image, but also an array
of pixels for texture mapping. Shapes can include the
geometry but not the texture map array. You can reduce an
iamge to pure geometry, but it requires two triangles per
pixel which will be slow for large images. You can
experiment with speed and memory use by disabling texture
mapping off when you display an image.

Cheers,
Bill