com.jhlabs.image
Class SplineColormap

java.lang.Object
  extended by com.jhlabs.image.ArrayColormap
      extended by com.jhlabs.image.SplineColormap
All Implemented Interfaces:
Colormap, java.io.Serializable, java.lang.Cloneable

public class SplineColormap
extends ArrayColormap
implements java.io.Serializable

A Colormap implemented using Catmull-Rom colour splines. The map has a variable number of knots with a minimum of four. The first and last knots give the tangent at the end of the spline, and colours are interpolated from the second to the second-last knots.

See Also:
Serialized Form

Field Summary
 int numKnots
           
 int[] xKnots
           
 int[] yKnots
           
 
Constructor Summary
SplineColormap()
           
SplineColormap(int[] xKnots, int[] yKnots)
           
 
Method Summary
 void addKnot(int x, int color)
           
 int getKnot(int n)
           
 void removeKnot(int n)
           
 void setKnot(int n, int color)
           
 void setKnotPosition(int n, int x)
           
 
Methods inherited from class com.jhlabs.image.ArrayColormap
clone, getColor, getMap, setColor, setColorInterpolated, setColorRange, setColorRange, setMap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numKnots

public int numKnots

xKnots

public int[] xKnots

yKnots

public int[] yKnots
Constructor Detail

SplineColormap

public SplineColormap()

SplineColormap

public SplineColormap(int[] xKnots,
                      int[] yKnots)
Method Detail

getKnot

public int getKnot(int n)

setKnot

public void setKnot(int n,
                    int color)

addKnot

public void addKnot(int x,
                    int color)

removeKnot

public void removeKnot(int n)

setKnotPosition

public void setKnotPosition(int n,
                            int x)