|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.jai.OperationDescriptorImpl
it.geosolutions.jaiext.stats.StatisticsDescriptor
public class StatisticsDescriptor
An 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:
The source can have all the possible JAI 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 JAI 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 | it.geosolutions.jaiext.roiaware |
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 | it.geosolutions.jaiext.range.Range | null |
useRoiAccessor | Boolean | False |
bands | int[] | null |
stats | it.geosolutions.jaiext.stats.Statistics.StatsType[] | null |
minBounds | double[] | null |
maxBounds | double[] | null |
numBins | int[] | null |
Field Summary |
---|
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
---|
sourceNames, supportedModes |
Fields inherited from interface javax.media.jai.OperationDescriptor |
---|
NO_PARAMETER_DEFAULT |
Constructor Summary | |
---|---|
StatisticsDescriptor()
|
Method Summary | |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage source0,
int xPeriod,
int yPeriod,
javax.media.jai.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 javax.media.jai.RenderedOp |
create(RenderedImage source0,
int xPeriod,
int yPeriod,
javax.media.jai.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. |
javax.media.jai.PropertyGenerator[] |
getPropertyGenerators()
Returns an array of PropertyGenerators implementing property inheritance for the "Stats" operation |
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
---|
arePropertiesSupported, getDefaultSourceClass, 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, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatisticsDescriptor()
Method Detail |
---|
public javax.media.jai.PropertyGenerator[] getPropertyGenerators()
PropertyGenerators
implementing property inheritance for the "Stats" operation
getPropertyGenerators
in interface javax.media.jai.OperationDescriptor
getPropertyGenerators
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(RenderedImage source0, int xPeriod, int yPeriod, javax.media.jai.ROI roi, Range noData, boolean useRoiAccessor, int[] bands, Statistics.StatsType[] stats, double[] minBounds, double[] maxBounds, int[] numBins, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 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
- The RenderingHints
to use.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static javax.media.jai.RenderedOp create(RenderedImage source0, int xPeriod, int yPeriod, javax.media.jai.ROI roi, Range noData, boolean useRoiAccessor, int[] bands, Statistics.StatsType[] stats, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 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
- The RenderingHints
to use.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |