Class AbstractContourGenerator

java.lang.Object
org.jzy3d.contour.AbstractContourGenerator
Direct Known Subclasses:
MapperContourMeshGenerator, MapperContourPictureGenerator

public abstract class AbstractContourGenerator extends Object
The AbstractContourGenerator provides various utility fonctions to compute core contour matrices. A concrete generator should implement
invalid @link
computeHeightMatrix()
according to the input object on which one desire to compute a contour (
invalid @link
Mapper
s,
invalid @link
Shape
s, etc).
Author:
Juan Barandiaran
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
     
    protected double
     
    protected static double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double[][]
    computeContour(int xRes, int yRes, double[] sortedLevels)
    Calculates the points in the XY plane that belong to a contour whose height is defined by the user in an array
    protected double[][]
    computeContour(int xRes, int yRes, int nLevels)
    Calculates the points in the XY plane that belong to a contour
    protected double[][]
    computeFilledContour(int xRes, int yRes, int nLevels)
    To paint the contours in the XY plane filling with color between contour and contour
    protected abstract void
    computeHeightMatrix(double[][] matrix, int xRes, int yRes)
     
    protected double[][]
    computeXYColors(int xRes, int yRes, int nLevels)
    Having the colors of the surface on the XY plane gives a lot of info in some surfaces
    protected void
    extractCountours(double[][] contours, double[][] matrix, int xSpan, int ySpan)
    A point belongs to the contour if it is bigger than anyone of the surrounding points of the Quantized matrix It is NOT part of the contour if it is equal (or smaller) to all the surrounding points
    protected void
    quantizeMatrix(double[][] matrix, double[] sortedLevels)
    Force the input matrix to have the minimum bigger value of the user provided sortedLevels list
    protected void
    quantizeMatrix(double[][] matrix, double min, double max, int n)
    Force the input matrix to have values rounded to one of the N steps in the range [min;max].

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NON_CONTOUR

      protected static double NON_CONTOUR
    • minValue

      protected double minValue
    • maxValue

      protected double maxValue
  • Constructor Details

    • AbstractContourGenerator

      public AbstractContourGenerator()
  • Method Details

    • computeHeightMatrix

      protected abstract void computeHeightMatrix(double[][] matrix, int xRes, int yRes)
    • computeContour

      protected double[][] computeContour(int xRes, int yRes, int nLevels)
      Calculates the points in the XY plane that belong to a contour
    • computeContour

      protected double[][] computeContour(int xRes, int yRes, double[] sortedLevels)
      Calculates the points in the XY plane that belong to a contour whose height is defined by the user in an array
    • computeFilledContour

      protected double[][] computeFilledContour(int xRes, int yRes, int nLevels)
      To paint the contours in the XY plane filling with color between contour and contour
    • computeXYColors

      protected double[][] computeXYColors(int xRes, int yRes, int nLevels)
      Having the colors of the surface on the XY plane gives a lot of info in some surfaces
    • quantizeMatrix

      protected void quantizeMatrix(double[][] matrix, double[] sortedLevels)
      Force the input matrix to have the minimum bigger value of the user provided sortedLevels list
    • quantizeMatrix

      protected void quantizeMatrix(double[][] matrix, double min, double max, int n)
      Force the input matrix to have values rounded to one of the N steps in the range [min;max].
    • extractCountours

      protected void extractCountours(double[][] contours, double[][] matrix, int xSpan, int ySpan)
      A point belongs to the contour if it is bigger than anyone of the surrounding points of the Quantized matrix It is NOT part of the contour if it is equal (or smaller) to all the surrounding points