Documentation of 'Catalano.Imaging.Tools.Curve' Java class
Curve
Catalano.Imaging.Tools

Class Curve

  • All Implemented Interfaces:
    java.io.Serializable


    public class Curve
    extends java.lang.Object
    implements java.io.Serializable
    Curve representation.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      float[] x 
      float[] y 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Curve()
      Initialize a new instance of the Curve class.
      Curve(Curve curve)
      Initialize a new instance of the Curve class.
      Curve(float[] x, float[] y)
      Initialize a new instance of the Curve class.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addPoint(float kx, float ky)
      Add point in the curve.
      void addPoint(FloatPoint point)
      Add point in the curve.
      void addPoint(java.util.List<FloatPoint> points)
      Add collection of points.
      void clear()
      Clear all the points.
      float[] getX()
      Get value of the x axis coordinates.
      float[] getY()
      Get value of the y axis coordinates.
      int[] makeLut()
      Create LUT.
      void removePoint(int index)
      Remove point
      void setX(float[] x)
      Set values of the x axis coordinates.
      void setXY(float[] x, float[] y)
      Set the values.
      void setY(float[] y)
      Set value of the y axis coordinates.
      static float Spline(float x, int numKnots, float[] knots)
      Compute a Catmull-Rom spline.
      static float Spline(float x, int numKnots, int[] xknots, int[] yknots)
      Compute a Catmull-Rom spline, but with variable knot spacing.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • x

        public float[] x
      • y

        public float[] y
    • Constructor Detail

      • Curve

        public Curve()
        Initialize a new instance of the Curve class.
      • Curve

        public Curve(Curve curve)
        Initialize a new instance of the Curve class.
        Parameters:
        curve - Curve.
      • Curve

        public Curve(float[] x,
                     float[] y)
        Initialize a new instance of the Curve class.
        Parameters:
        x - X points.
        y - Y points.
    • Method Detail

      • getX

        public float[] getX()
        Get value of the x axis coordinates.
        Returns:
        X axis coordinates.
      • setX

        public void setX(float[] x)
        Set values of the x axis coordinates.
        Parameters:
        x - X axis coordinates.
      • getY

        public float[] getY()
        Get value of the y axis coordinates.
        Returns:
        Y axis coordinates.
      • setY

        public void setY(float[] y)
        Set value of the y axis coordinates.
        Parameters:
        y - Y axis coordinates.
      • setXY

        public void setXY(float[] x,
                          float[] y)
        Set the values.
        Parameters:
        x - X axis coordinates.
        y - Y axis coordinates.
      • addPoint

        public void addPoint(java.util.List<FloatPoint> points)
        Add collection of points.
        Parameters:
        points - Points.
      • addPoint

        public void addPoint(FloatPoint point)
        Add point in the curve.
        Parameters:
        point - Point.
      • addPoint

        public void addPoint(float kx,
                             float ky)
        Add point in the curve.
        Parameters:
        kx - X axis coordinate.
        ky - Y axis coordinate.
      • removePoint

        public void removePoint(int index)
        Remove point
        Parameters:
        index - Index.
      • clear

        public void clear()
        Clear all the points.
      • makeLut

        public int[] makeLut()
        Create LUT.
        Returns:
        LUT.
      • Spline

        public static float Spline(float x,
                                   int numKnots,
                                   float[] knots)
        Compute a Catmull-Rom spline.
        Parameters:
        x - the input parameter
        numKnots - the number of knots in the spline
        knots - the array of knots
        Returns:
        the spline value
      • Spline

        public static float Spline(float x,
                                   int numKnots,
                                   int[] xknots,
                                   int[] yknots)
        Compute a Catmull-Rom spline, but with variable knot spacing.
        Parameters:
        x - the input parameter
        numKnots - the number of knots in the spline
        xknots - the array of knot x values
        yknots - the array of knot y values
        Returns:
        the spline value

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.