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.

converting HSV to RGB

Hi 

Maybe somebody can give me a short answer on following questions.

1. In the BaseColorControl class there is a method for initializing RGB
colormap to HSV Values. Now, is it possible to convert the HSV values
back to RGB again ? 

2. I also have got  problems with the getTable method. After defining the
display as follows, the getTable() methods return a NullPointerException.

...
...

ScalarMap colMap = new ScalarMap(col, Display.XAxis);
ScalarMap rowMap = new ScalarMap(row, Display.YAxis);
ScalarMap expMap = new ScalarMap(exp, Display.Hue);
ScalarMap errMap = new ScalarMap(err, Display.Saturation);
ConstantMap constMap = new ConstantMap(1.0f, Display.Value);

display.addMap(colMap);
display.addMap(rowMap);
display.addMap(expMap);
display.addMap(errMap);
display.addMap(constMap);

..
..

ColorControl saturationControl = (ColorControl)errMap.getControl();
float[][] saturation = saturationControl.getTable();

ColorControl hueControl = (ColorControl)expMap.getControl();
float[][] hue = hueControl.getTable();



Thanks

Patrick



   


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