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.
Hi Big Jeff, > First of all, I will like to thank you all of you for your help... It > would be very difficult without you!!! > > Ok, here we go. I have a DisplayImplJ3D mapped in this way: > time -> Animation > XCoord -> XAxis > YCoord -> YAxis > ZCoord -> zAxis > I have included some dataReferences in the display, with this type: > > time ->( (xCoord, yCoord, zCoord) -> concentration) > > The problem is that I just want include a GIF in the display; a GIF > of the Madrid area, and I want to represent the surface height too, so > the GIF would not be a "flat" one. > > I read the VisAD guide, and,as the GIFAdapter gives me the type: > > (ImageElement, ImageLine) -> (Red, Green, Blue) > > I think the type to include in my display would be something like these: > > (xCoord, yCoord) -> (zCoord, Red, Green, Blue) > > My question is: Can i do it? How? When VisAD reads images from McIDAS, HDF-EOS and some other file formats, they come with information defining the earth locations of their pixels. Not so with GIF images. For those, you will need to find some way to get the latitudes and longitudes of pixels into your program. Also, you need to know the relation of your xCoord and yCoord to latitude and longitude. Create your FlatField with MathType: ((xCoord, yCoord) -> (zCoord, Red, Green, Blue)) and with a Gridded2DSet domain Set. You can pass location values for pixels in the samples argument to the Gridded2DSet constructor. You can get the Red, Green and Blue values out of your GIF FlatField by a call to getFloats(), and pass them and the zCoord values to the new FlatField by its setSamples() method. Good luck, Bill
visad
archives: