org.jscience.media.pictures.filters
Class GrayscaleColormap

java.lang.Object
  extended by org.jscience.media.pictures.filters.GrayscaleColormap
All Implemented Interfaces:
java.io.Serializable, Colormap

public class GrayscaleColormap
extends java.lang.Object
implements Colormap, java.io.Serializable

A grayscale colormap. Black is 0, white is 1.

See Also:
Serialized Form

Constructor Summary
GrayscaleColormap()
          Creates a new GrayscaleColormap object.
 
Method Summary
 int getColor(float v)
          Convert a value in the range 0..1 to an RGB color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrayscaleColormap

public GrayscaleColormap()
Creates a new GrayscaleColormap object.

Method Detail

getColor

public int getColor(float v)
Convert a value in the range 0..1 to an RGB color.

Specified by:
getColor in interface Colormap
Parameters:
v - a value in the range 0..1
Returns:
an RGB color