HiRISE

HiRISE.HiReport.util
Class SpectrumPaintScale

java.lang.Object
  extended by HiRISE.HiReport.util.SpectrumPaintScale
All Implemented Interfaces:
Serializable, PaintScale

public class SpectrumPaintScale
extends Object
implements PaintScale, Serializable

Represents a range of colors from indigo to blue, cyan, green, yellow, orange, and red. By default, data values from 0 to 1 are mapped, values below zero are black and values above one are white. The range can be changed by using the appropriate constructor.

See Also:
Serialized Form

Field Summary
static String ID
          CVS ID
 
Constructor Summary
SpectrumPaintScale()
          Use the defaults, with a minimum of 0 and a maximum of 1.
SpectrumPaintScale(double lo, double hi)
          Change the data range expected.
 
Method Summary
 double getLowerBound()
          Get the data value at the bottom of the range.
 Color getPaint(double val)
          Lookup the paint color to use for a data value
 double getUpperBound()
          Get the data value at the top of the range.
static void main(String[] args)
          Command-line testing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values
Constructor Detail

SpectrumPaintScale

public SpectrumPaintScale()
Use the defaults, with a minimum of 0 and a maximum of 1.


SpectrumPaintScale

public SpectrumPaintScale(double lo,
                          double hi)
Change the data range expected.

Parameters:
lo - The lowest valid data value
hi - The highest valid data value
Method Detail

getLowerBound

public double getLowerBound()
Get the data value at the bottom of the range.

Specified by:
getLowerBound in interface PaintScale
Returns:
lower bound

getUpperBound

public double getUpperBound()
Get the data value at the top of the range.

Specified by:
getUpperBound in interface PaintScale
Returns:
upper bound

getPaint

public Color getPaint(double val)
Lookup the paint color to use for a data value

Specified by:
getPaint in interface PaintScale
Parameters:
val - The data value
Returns:
The paint to use

main

public static void main(String[] args)
Command-line testing

Parameters:
args - unused

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona