All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.jhlabs.image.LinearColormap

java.lang.Object
   |
   +----com.jhlabs.image.LinearColormap

public class LinearColormap
extends java.lang.Object
implements com.jhlabs.image.Colormap, java.io.Serializable
A colormap which interpolates linearly between two colors.


Constructor Index

 o LinearColormap()
Construct a color map with a grayscale ramp from black to white
 o LinearColormap(int, int)
Construct a linear color map

Method Index

 o getColor(double)
Convert a value in the range 0..1 to an RGB color.
 o getColor1()
Get the first color
 o getColor2()
Get the second color
 o setColor1(int)
Set the first color
 o setColor2(int)
Set the second color

Constructors

 o LinearColormap
 public LinearColormap()
Construct a color map with a grayscale ramp from black to white

 o LinearColormap
 public LinearColormap(int color1,
                       int color2)
Construct a linear color map

Parameters:
color1 - the color corresponding to value 0 in the colormap
color2 - the color corresponding to value 1 in the colormap

Methods

 o setColor1
 public void setColor1(int color1)
Set the first color

Parameters:
color1 - the color corresponding to value 0 in the colormap
 o getColor1
 public int getColor1()
Get the first color

Returns:
the color corresponding to value 0 in the colormap
 o setColor2
 public void setColor2(int color2)
Set the second color

Parameters:
color2 - the color corresponding to value 1 in the colormap
 o getColor2
 public int getColor2()
Get the second color

Returns:
the color corresponding to value 1 in the colormap
 o getColor
 public int getColor(double v)
Convert a value in the range 0..1 to an RGB color.

Parameters:
v - a value in the range 0..1
Returns:
an RGB color

All Packages  Class Hierarchy  This Package  Previous  Next  Index