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 Carlos, > My question is: I got a a DisplayImplJ2D with a RealType mapped to RGB. > I got a LabeledRGBWidget controlling this map. > Im able to write the display image to disc, but I want to take the color > scale of the LabeledRGBWidget to the same image, so I can get a GIF file > with the display and the scale. > > I dont know how to do it, and even if I can do it, so a little help is > needed!! ;-) You can get the color table as follows: ScalarMap rgbMap = new ScalarMap(..., Display.RGB); . . . ColorControl control = (ColorControl) rgbMap.getControl(); float[][] table = control.getTable(); // now save the table with the image I don't know enough about your file format to know how you'd save the color table, but at least this code shows you how to get the table information from VisAD. Good luck, Bill
visad
archives: