Package de.gsi.chart.renderer.spi
Class ContourDataSetRenderer
- java.lang.Object
-
- de.gsi.chart.renderer.spi.AbstractDataSetManagement<R>
-
- de.gsi.chart.renderer.spi.AbstractPointReductionManagment<R>
-
- de.gsi.chart.renderer.spi.AbstractContourDataSetRendererParameter<ContourDataSetRenderer>
-
- de.gsi.chart.renderer.spi.ContourDataSetRenderer
-
- All Implemented Interfaces:
Renderer
public class ContourDataSetRenderer extends AbstractContourDataSetRendererParameter<ContourDataSetRenderer> implements Renderer
Default renderer for the display of 3D surface-type DataSets. The following drawing options controlled viaAbstractContourDataSetRendererParameter.setContourType(de.gsi.chart.renderer.ContourType)are provided:- CONTOUR: marching-square based contour plotting algorithm, see e.g. reference
- CONTOUR_FAST: an experimental contour plotting algorithm,
- CONTOUR_HEXAGON: a hexagon-map based contour plotting algorithm,
- HEATMAP: an 2D orthogonal projection based plotting algorithm
- HEATMAP_HEXAGON: an 2D orthogonal hexagon-projection based plotting algorithm.
AbstractPointReductionManagment.setParallelImplementation(boolean). A data reduction is performed in case the number of data points exceed the the underlying number Canvas pixels number in order to improve efficiency and required texture GPU buffer. This data reduction is controlled viaAbstractPointReductionManagment.setPointReduction(boolean)and the reduction type (MIN, MAX, AVERAGE, DOWN_SAMPLE) viaAbstractContourDataSetRendererParameter.setReductionType(de.gsi.chart.renderer.datareduction.ReductionType), and theAbstractContourDataSetRendererParameter.setReductionFactorX(int)andAbstractContourDataSetRendererParameter.setReductionFactorY(int)functions. N.B. Regarding implementation of user-level DataSet interfaces: While the DataSet3D::getZ(int) and DataSet::get(DIM_Z, int) routines should match, the DataSet3D is considered a convenience interface primarily to be used for external user-level code. This renderer primarily relies for performance reasons internally on the more generic DataSet::get(DIM_Z, int index) interface. DataSet::get(DIM_Z, int index) is assumed to be a row-major ordered matrix with the (0, 0) coordinate (ie. first index get(DIM_Z, 0)) being drawn at the bottom left corner of the canvas for non-inverted axes.- Author:
- rstein
-
-
Field Summary
Fields Modifier and Type Field Description protected javafx.scene.shape.RectanglegradientRect-
Fields inherited from class de.gsi.chart.renderer.spi.AbstractDataSetManagement
showInLegend
-
-
Constructor Summary
Constructors Constructor Description ContourDataSetRenderer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doubleconvolution(double[][] pixelMatrix)javafx.scene.canvas.CanvasdrawLegendSymbol(de.gsi.dataset.DataSet dataSet, int dsIndex, int width, int height)static doubleerosionConvolution(double[][] pixelMatrix)protected ContourDataSetRenderergetThis()AxisgetZAxis()protected voidlayoutZAxis(Axis zAxis)voidrender(javafx.scene.canvas.GraphicsContext gc, Chart chart, int dataSetOffset, javafx.collections.ObservableList<de.gsi.dataset.DataSet> datasets)voidshiftZAxisToLeft()voidshiftZAxisToRight()-
Methods inherited from class de.gsi.chart.renderer.spi.AbstractContourDataSetRendererParameter
altImplementationProperty, colorGradientProperty, computeLocalRange, computeLocalRangeProperty, contourTypeProperty, getColorGradient, getContourType, getMaxContourSegments, getMinHexTileSizeProperty, getNumberQuantisationLevels, getReductionFactorX, getReductionFactorY, getReductionType, isAltImplementation, isSmooth, maxContourSegmentsProperty, minHexTileSizeProperty, quantisationLevelsProperty, reductionFactorXProperty, reductionFactorYProperty, reductionTypeProperty, setAltImplementation, setColorGradient, setComputeLocalRange, setContourType, setMaxContourSegments, setMinHexTileSizeProperty, setNumberQuantisationLevels, setReductionFactorX, setReductionFactorY, setReductionType, setSmooth, smoothProperty
-
Methods inherited from class de.gsi.chart.renderer.spi.AbstractPointReductionManagment
actualPointReductionProperty, assumeSortedDataProperty, getMinRequiredReductionSize, isActualReducePoints, isAssumeSortedData, isParallelImplementation, isReducePoints, minRequiredReductionSizeProperty, parallelImplementationProperty, pointReductionProperty, setAssumeSortedData, setMinRequiredReductionSize, setParallelImplementation, setPointReduction
-
Methods inherited from class de.gsi.chart.renderer.spi.AbstractDataSetManagement
copyMetaData, getAxes, getDataSetCopy, getDatasets, getDatasetsCopy, getDatasetsCopy, getErrorDataSetCopy, getFirstAxis, getFirstAxis, setShowInLegend, showInLegend, showInLegendProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.gsi.chart.renderer.Renderer
getAxes, getDatasets, getDatasetsCopy, setShowInLegend, showInLegend, showInLegendProperty
-
-
-
-
Method Detail
-
drawLegendSymbol
public javafx.scene.canvas.Canvas drawLegendSymbol(de.gsi.dataset.DataSet dataSet, int dsIndex, int width, int height)- Specified by:
drawLegendSymbolin interfaceRenderer- Parameters:
dataSet- the data set for which the representative icon should be generateddsIndex- index within renderer setwidth- requested width of the returning Canvasheight- requested height of the returning Canvas- Returns:
- a graphical icon representation of the given data sets
-
getThis
protected ContourDataSetRenderer getThis()
- Specified by:
getThisin classAbstractDataSetManagement<ContourDataSetRenderer>- Returns:
- the instance of this ContourDataSetRenderer.
-
getZAxis
public Axis getZAxis()
-
layoutZAxis
protected void layoutZAxis(Axis zAxis)
-
render
public void render(javafx.scene.canvas.GraphicsContext gc, Chart chart, int dataSetOffset, javafx.collections.ObservableList<de.gsi.dataset.DataSet> datasets)
-
shiftZAxisToLeft
public void shiftZAxisToLeft()
-
shiftZAxisToRight
public void shiftZAxisToRight()
-
convolution
public static double convolution(double[][] pixelMatrix)
-
erosionConvolution
public static double erosionConvolution(double[][] pixelMatrix)
-
-