Class Histogram
-
- All Implemented Interfaces:
Serializable,Operation
public class Histogram extends BaseStatisticsOperationJAI
* This operation simply wraps JAI Histogram operations described byHistogramDescriptorinside 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
Shapesubclass and the parameters to control x and y subsamplings got to be Integer, which means pixel-aware.For more information on how the underlying
JAIoperators works you can have a look here: HistogramDescriptor- Since:
- 2.4
- Author:
- Simone Giannecchini
- See Also:
Histogram, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class OperationJAI
OperationJAI.Parameters
-
-
Field Summary
Fields Modifier and Type Field Description static StringGT_SYNTHETIC_PROPERTY_HISTOGRAMStringkey for getting theHistogramobject.-
Fields inherited from class BaseStatisticsOperationJAI
LOGGER, ROI, SPATIAL_SUBSAMPLING_X, SPATIAL_SUBSAMPLING_Y
-
Fields inherited from class OperationJAI
operation, RENDERED_MODE
-
Fields inherited from class Operation2D
PRIMARY_SOURCE_INDEX, SOURCE_0
-
Fields inherited from class AbstractOperation
descriptor
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns the name of the processing operation.protected Map<String,?>getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)Prepare theHistogramproperty for this histogram operation.protected voidhandleJAIEXTParams(ParameterBlockJAI parameters, ParameterValueGroup parameters2)Extension point for adding to the JAIParameterBlockJAIobject the parameters defined in theParameterValueGroup, which can be read by the JAI-EXT operations.protected ParameterBlockJAIprepareParameters(ParameterValueGroup parameters)Copies parameter values from the specifiedParameterValueGroupto theParameterBlockJAI-
Methods inherited from class BaseStatisticsOperationJAI
convertPolygon
-
Methods inherited from class OperationJAI
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveSampleDimension, deriveUnit, doOperation, equals, extractSources, getJAI, getOperationDescriptor, getQuantitative, handleROINoDataInternal, handleROINoDataProperties, hashCode, resampleToCommonGeometry
-
Methods inherited from class Operation2D
extractSources, getFactory
-
Methods inherited from class AbstractOperation
getDescription, getDocURL, getNumSources, getParameters, getVendor, getVersion, toString
-
-
-
-
Field Detail
-
GT_SYNTHETIC_PROPERTY_HISTOGRAM
public static final String GT_SYNTHETIC_PROPERTY_HISTOGRAM
Stringkey for getting theHistogramobject.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Histogram
public Histogram() throws OperationNotFoundExceptionDefault constructor for theHistogramoperation.- Throws:
OperationNotFoundException
-
-
Method Detail
-
getName
public String getName()
Description copied from class:AbstractOperationReturns the name of the processing operation. The default implementation returns the AbstractOperation.descriptor code name.- Specified by:
getNamein interfaceOperation- Overrides:
getNamein classAbstractOperation- Returns:
- The name of the processing operation.
-
getProperties
protected Map<String,?> getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)
Prepare theHistogramproperty for this histogram operation.See HistogramDescriptor for more info.
- Overrides:
getPropertiesin classOperationJAI- Parameters:
data- TheRenderedImagecreated by this operation.crs- The coordinate reference system assigned to the coverage thisOperationJAIwill produce.name- The name assigned to the coverage thisOperationJAIwill produce.toCRS- The transform from grid tocrsto be assigned to the coverage thisOperationJAIwill produce.sources- The sources to be assigned to the coverage thisOperationJAIwill produce.parameters- The parameters that were used by thisOperationJAI.- Returns:
- a
Mapwith the properties generated by thisOperationJAIor null if we haven't any.
-
prepareParameters
protected ParameterBlockJAI prepareParameters(ParameterValueGroup parameters)
Description copied from class:BaseStatisticsOperationJAICopies parameter values from the specifiedParameterValueGroupto theParameterBlockJAI- Overrides:
prepareParametersin classBaseStatisticsOperationJAI- Parameters:
parameters- TheParameterValueGroupto be copied.- Returns:
- A copy of the provided
ParameterValueGroupas a JAI block. - See Also:
OperationJAI.prepareParameters(org.geotools.api.parameter.ParameterValueGroup)
-
handleJAIEXTParams
protected void handleJAIEXTParams(ParameterBlockJAI parameters, ParameterValueGroup parameters2)Description copied from class:OperationJAIExtension point for adding to the JAIParameterBlockJAIobject the parameters defined in theParameterValueGroup, which can be read by the JAI-EXT operations.Notice that if you are using JAI, the new parameters will not be accepted by the
ParameterBlockJAIinstance.- Overrides:
handleJAIEXTParamsin classOperationJAI- Parameters:
parameters-ParameterBlockJAIinstance used by the current JAI-EXT/JAI operationparameters2-ParameterValueGroupinstance containing input operation parameters
-
-