Class SplineColormap

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

public class SplineColormap extends ArrayColormap implements 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:
  • Field Details

    • numKnots

      public int numKnots
    • xKnots

      public int[] xKnots
    • yKnots

      public int[] yKnots
  • Constructor Details

    • SplineColormap

      public SplineColormap()
    • SplineColormap

      public SplineColormap(int[] xKnots, int[] yKnots)
  • Method Details

    • 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)