public class Histogram extends BaseStatisticsOperationJAI
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
OperationJAI.Parameters
Modifier and Type | Field and Description |
---|---|
static String |
GT_SYNTHETIC_PROPERTY_HISTOGRAM
String key for getting the Histogram object. |
LOGGER, ROI, SPATIAL_SUBSAMPLING_X, SPATIAL_SUBSAMPLING_Y
operation, RENDERED_MODE
PRIMARY_SOURCE_INDEX, SOURCE_0
descriptor
Constructor and Description |
---|
Histogram()
Default constructor for the
Histogram operation. |
Modifier and Type | Method and Description |
---|---|
String |
getName()
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 the
Histogram property for this histogram operation. |
protected void |
handleJAIEXTParams(ParameterBlockJAI parameters,
ParameterValueGroup parameters2)
Extension point for adding to the JAI
ParameterBlockJAI object the parameters defined
in the ParameterValueGroup , which can be read by the JAI-EXT operations. |
protected ParameterBlockJAI |
prepareParameters(ParameterValueGroup parameters)
Copies parameter values from the specified
ParameterValueGroup to the ParameterBlockJAI |
convertPolygon
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveSampleDimension, deriveUnit, doOperation, equals, extractSources, getJAI, getOperationDescriptor, getQuantitative, handleROINoDataInternal, handleROINoDataProperties, hashCode, resampleToCommonGeometry
extractSources, getFactory
getDescription, getDocURL, getNumSources, getParameters, getVendor, getVersion, toString
public static final String GT_SYNTHETIC_PROPERTY_HISTOGRAM
String
key for getting the Histogram
object.public Histogram() throws OperationNotFoundException
Histogram
operation.OperationNotFoundException
public String getName()
AbstractOperation
getName
in interface Operation
getName
in class AbstractOperation
protected Map<String,?> getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)
Histogram
property for this histogram operation.
See HistogramDescriptor for more info.
getProperties
in class OperationJAI
data
- The RenderedImage
created by this operation.crs
- The coordinate reference system assigned to the coverage this OperationJAI
will produce.name
- The name assigned to the coverage this OperationJAI
will produce.toCRS
- The transform from grid to crs
to be
assigned to the coverage this OperationJAI
will produce.sources
- The sources to be assigned to the coverage this OperationJAI
will
produce.parameters
- The parameters that were used by this OperationJAI
.Map
with the properties generated by this OperationJAI
or null if
we haven't any.OperationJAI#getProperties(RenderedImage, CoordinateReferenceSystem,
InternationalString, MathTransform, GridCoverage2D[],
org.geotools.coverage.processing.OperationJAI.Parameters),
protected ParameterBlockJAI prepareParameters(ParameterValueGroup parameters)
BaseStatisticsOperationJAI
ParameterValueGroup
to the ParameterBlockJAI
prepareParameters
in class BaseStatisticsOperationJAI
parameters
- The ParameterValueGroup
to be copied.ParameterValueGroup
as a JAI block.OperationJAI.prepareParameters(org.opengis.parameter.ParameterValueGroup)
protected void handleJAIEXTParams(ParameterBlockJAI parameters, ParameterValueGroup parameters2)
OperationJAI
ParameterBlockJAI
object the parameters defined
in the ParameterValueGroup
, 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 ParameterBlockJAI
instance.
handleJAIEXTParams
in class OperationJAI
parameters
- ParameterBlockJAI
instance used by the current JAI-EXT/JAI
operationparameters2
- ParameterValueGroup
instance containing input operation parametersCopyright © 1996–2019 Geotools. All rights reserved.