Package org.jzy3d.contour
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 implementcomputeHeightMatrix()
according to the input object on which one desire to compute a contour (Mapper
s,Shape
s, etc).- Author:
- Juan Barandiaran
-
-
Field Summary
Fields Modifier and Type Field Description protected double
maxValue
protected double
minValue
protected static double
NON_CONTOUR
-
Constructor Summary
Constructors Constructor Description AbstractContourGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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 arrayprotected double[][]
computeContour(int xRes, int yRes, int nLevels)
Calculates the points in the XY plane that belong to a contourprotected double[][]
computeFilledContour(int xRes, int yRes, int nLevels)
To paint the contours in the XY plane filling with color between contour and contourprotected 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 surfacesprotected 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 pointsprotected void
quantizeMatrix(double[][] matrix, double[] sortedLevels)
Force the input matrix to have the minimum bigger value of the user provided sortedLevels listprotected 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].
-
-
-
Method Detail
-
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
-
-