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: Gif`s in visad

Hi Olver,

> i follow your instructions, but i don`t know what happend.

You only partially followed my instructions.

> The problem is that i need to show the gif in a display with maps
> longitude and latitude like in the example that i send.
> 
> i need to paint the gif on a display with flatfield
> (latitude,longitude)->(Realtype)

You copied the pixels from the GIF image with MathType:

  ((ImageElement, ImageLine) -> (Red, Green, Blue))

into a FlatField with MathType:

  ((Longitude, Latitude) -> (Red, Green, Blue))

But then your ScalarMap:

  redMap =  new ScalarMap( new RealType("RGB"), Display.RGB );

uses the "RGB" RealType that is not part of your new FlatField.

I was able to get your program to display an image by changing:

  redMap =  new ScalarMap( new RealType("RGB"), Display.RGB );

to:

  redMap =  new ScalarMap( redType, Display.RGB );

and also changing:

  visad.Linear2DSet Valdom = new visad.Linear2DSet(campo,0,40,Filas,
                                                   0,40,Columnas);
to:

  visad.Linear2DSet Valdom = new visad.Linear2DSet(campo,0,40,Columnas,
                                                   0,40,Filas);

and changing:

  for(int i=0;i<imageData.getRangeDimension();i++)

to:

  for(int i=0;i<imageData.getLength();i++)

I think you need to spend more time studying the tutorial
and the examples.

Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


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