All Implemented Interfaces:
Serializable, Operation

public class Histogram extends BaseStatisticsOperationJAI
* This operation simply wraps JAI Histogram operations described by HistogramDescriptor inside a GeoTools operation in order to make it spatial-aware.

For the moment this is a very simple wrap. Plans on the 2.4 and successive versions of this operation are to add the ability to use spatial ROIs and to specific Spatial subsampling. As of now, ROI has to be a Java2D Shape subclass and the parameters to control x and y subsamplings got to be Integer, which means pixel-aware.

For more information on how the underlying JAI operators works you can have a look here: HistogramDescriptor <a href="http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs/javax/media/jai/Histogram.html>Histogram

How to use this operation Here is a very simple example on how to use this operation in order to get the Histogram of the source coverage. final OperationJAI op=new OperationJAI("Histogram"); ParameterValueGroup params = op.getParameters(); params.parameter("Source").setValue(coverage); coverage=(GridCoverage2D) op.doOperation(params,null); System.out.println(((double[])coverage.getProperty("histogram")));

Since:
2.4
Author:
Simone Giannecchini
See Also: