Package org.jzy3d.contour
Class AbstractContourGenerator
java.lang.Object
org.jzy3d.contour.AbstractContourGenerator
- Direct Known Subclasses:
MapperContourMeshGenerator
,MapperContourPictureGenerator
The AbstractContourGenerator provides various utility fonctions to compute core contour matrices.
A concrete generator should implement
according to the input object
on which one desire to compute a contour (
s,
s, etc).
invalid @link
computeHeightMatrix()
invalid @link
Mapper
invalid @link
Shape
- Author:
- Juan Barandiaran
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected double
protected static double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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].
-
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
-