Class StatisticsDescriptor
- All Implemented Interfaces:
Serializable,OperationDescriptor,RegistryElementDescriptor
OperationDescriptor describing various "Statistical" operation supporting ROI and NoData.
The SimpleStats operation takes in input a source image and an array indicating which bands to analyze and which kind of statistics can be done. More statistics can be computed inside the same image. The possible statistics are:
- Mean
- Sum
- Maximum
- Minimum
- Extrema
- Variance
- Standard Deviation
- Histogram
- Mode
- Median
The source can have all the possible ImageN accepted data types. The statistical calculations are performed on every tile and stored inside an object which is a subclass of the "Statistics" class. For avoiding concurrency issues various techniques are used: for simple statistics, which does not request an array for storing the values, local statistics are calculated and then accumulated in a synchronized block; for complex statistics, other techniques are used. The statistical results are returned by calling the getProperty() method. The statistics are calculated only the first time for avoiding unnecessary calculations. With this setup an advantage is taken by using the internal ImageN MultiThreading.
When the results are returned by the getProperty() method as a 2-D array, the user must only select the first index related to one band and the second index related to a specific computation, as defined at the image creation, and then calling the getResult() method.
| Name | Value |
|---|---|
| GlobalName | Stats |
| LocalName | Stats |
| Vendor | org.eclipse.imagen.media |
| Description | Image operator for calculating simple image statistics like mean supporting ROI and No Data. |
| DocURL | Not Defined |
| Version | 1.0 |
| arg0Desc | Horizontal subsampling parameter. |
| arg1Desc | Vertical subsampling parameter. |
| arg2Desc | ROI object used. |
| arg3Desc | No Data Range used. |
| arg4Desc | Boolean checking if ROI RasterAccessor is used. |
| arg5Desc | Array containing the indexes of the bands to calculate. |
| arg6Desc | Array indicating which statistical operations must be performed on all the selected bands. | arg7Desc | Array indicating the minimum bounds for each statistic types (if needed). | arg8Desc | Array indicating the maximum bounds for each statistic types (if needed). | arg9Desc | Array indicating the number of bins for each statistic types (if needed). |
| Name | Class Type | Default Value |
|---|---|---|
| xPeriod | Integer | 1 |
| yPeriod | Integer | 1 |
| ROI | ROI | null |
| noData | org.eclipse.imagen.media.range.Range | null |
| useRoiAccessor | Boolean | False |
| bands | int[] | null |
| stats | org.eclipse.imagen.media.stats.Statistics.StatsType[] | null |
| lowValue | double[] | null |
| highValue | double[] | null |
| numBins | int[] | null |
- See Also:
-
Field Summary
Fields inherited from interface OperationDescriptor
NO_PARAMETER_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderedOpcreate(RenderedImage source0, int xPeriod, int yPeriod, ROI roi, Range noData, boolean useRoiAccessor, int[] bands, Statistics.StatsType[] stats, double[] minBounds, double[] maxBounds, int[] numBins, RenderingHints hints) Performs a statistical operation on an image defined by its "stats type" parameter.static RenderedOpcreate(RenderedImage source0, int xPeriod, int yPeriod, ROI roi, Range noData, boolean useRoiAccessor, int[] bands, Statistics.StatsType[] stats, RenderingHints hints) Performs a statistical operation on an image defined by its "stats type" parameter.Returns an array ofPropertyGeneratorsimplementing property inheritance for the "Stats" operationMethods inherited from class OperationDescriptorImpl
arePropertiesSupported, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, validateArguments, validateArguments, validateRenderableArguments
-
Constructor Details
-
StatisticsDescriptor
public StatisticsDescriptor()
-
-
Method Details
-
getPropertyGenerators
Returns an array ofPropertyGeneratorsimplementing property inheritance for the "Stats" operation- Specified by:
getPropertyGeneratorsin interfaceOperationDescriptor- Overrides:
getPropertyGeneratorsin classOperationDescriptorImpl- Returns:
- An array of property generators.
- See Also:
-
create
public static RenderedOp create(RenderedImage source0, int xPeriod, int yPeriod, ROI roi, Range noData, boolean useRoiAccessor, int[] bands, Statistics.StatsType[] stats, double[] minBounds, double[] maxBounds, int[] numBins, RenderingHints hints) Performs a statistical operation on an image defined by its "stats type" parameter.Creates a
ParameterBlockImageNfrom all supplied arguments excepthintsand invokesImageN.create(String,ParameterBlock,RenderingHints).- Parameters:
source0-RenderedImagesource 0.xPeriod- Horizontal subsampling.yPeriod- Vertical subsampling.ROI- Roi object on which the calculation are performed.NoData- No Data range used for calculation.useRoiAccessor- Boolean indicating if ROI RasterAccessor must be used.bands- Array indicating which band to consider.stats- Array indicating which statistics to consider.minBounds- Array indicating the minimum bounds for each statistic types .maxBounds- Array indicating the maximum bounds for each statistic types.numBins- Array indicating the number of bins for each statistic types.hints- TheRenderingHintsto use.- Returns:
- The
RenderedOpdestination. - Throws:
IllegalArgumentException- ifsource0isnull.- See Also:
-
create
public static RenderedOp create(RenderedImage source0, int xPeriod, int yPeriod, ROI roi, Range noData, boolean useRoiAccessor, int[] bands, Statistics.StatsType[] stats, RenderingHints hints) Performs a statistical operation on an image defined by its "stats type" parameter.Creates a
ParameterBlockImageNfrom all supplied arguments excepthintsand invokesImageN.create(String,ParameterBlock,RenderingHints).- Parameters:
source0-RenderedImagesource 0.xPeriod- Horizontal subsampling.yPeriod- Vertical subsampling.ROI- Roi object on which the calculation are performed.NoData- No Data range used for calculation.useRoiAccessor- Boolean indicating if ROI RasterAccessor must be used.bands- Array indicating which band to consider.stats- Array indicating which statistics to consider.hints- TheRenderingHintsto use.- Returns:
- The
RenderedOpdestination. - Throws:
IllegalArgumentException- ifsource0isnull.- See Also:
-