javax.media.jai.operator
Class MeanDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.MeanDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class MeanDescriptor
- extends OperationDescriptorImpl
An OperationDescriptor
describing the "Mean" operation.
The Mean operation scans a specific region of a rendered image
and computes the mean pixel value for each band within that region
of the image. The image data pass through this operation unchanged.
The region-wise mean pixel value for each band may be
retrieved by calling the getProperty
method on this
operation with "mean" as the property name. The return value has
type double[#bands]
.
The region of interest (ROI) does not have to be a rectangle.
It may be null
, in which case the entire image is
scanned to find the image-wise mean pixel value for each band.
The set of pixels scanned may be further reduced by
specifying the "xPeriod" and "yPeriod" parameters that represent
the sampling rate along each axis. These variables may not be
less than 1. However, they may be null
, in which
case the sampling rate is set to 1; that is, every pixel in the
ROI is processed.
Resource List
Name | Value |
GlobalName | Mean |
LocalName | Mean |
Vendor | com.sun.media.jai |
Description | Calculates the region-wise mean pixel value
for each band of an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/MeanDescriptor.html |
Version | 1.0 |
arg0Desc | The region of the image to scan. |
arg1Desc | The horizontal sampling rate,
may not be less than 1. |
arg2Desc | The vertical sampling rate,
may not be less than 1. |
Parameter List
Name | Class Type |
Default Value |
roi | javax.media.jai.ROI |
null |
xPeriod | java.lang.Integer |
1 |
yPeriod | java.lang.Integer |
1 |
- See Also:
ROI
,
OperationDescriptor
, Serialized Form
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamNames, getPropertyGenerators, 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 |
MeanDescriptor
public MeanDescriptor()
- Constructor.
getParamMinValue
public Number getParamMinValue(int index)
- Returns the minimum legal value of a specified numeric parameter
for this operation.
- Overrides:
getParamMinValue
in class OperationDescriptorImpl
- Following copied from class:
javax.media.jai.OperationDescriptorImpl
- Parameters:
index
- The index of the parameter to be queried.- Returns:
- A
Number
representing the minimum legal value,
or null
if the specified parameter is not
numeric. - Throws:
IllegalArgumentException
- if this operation has no parameters.ArrayIndexOutOfBoundsException
- if there is no parameter
corresponding to the specified index
.- See Also:
ParameterListDescriptor.getParamValueRange(java.lang.String)
,
ParameterListDescriptor.getEnumeratedParameterValues(java.lang.String)
,
ParameterListDescriptor.isParameterValueValid(java.lang.String, java.lang.Object)
create
public static RenderedOp create(RenderedImage source0,
ROI roi,
Integer xPeriod,
Integer yPeriod,
RenderingHints hints)
- Calculates the image-wise mean pixel value for each band of an image.
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
- Parameters:
source0
- RenderedImage
source 0.roi
- The region of the image to scan.
May be null
.xPeriod
- The horizontal sampling rate, may not be less than 1.
May be null
.yPeriod
- The vertical sampling rate, may not be less than 1.
May be null
.hints
- The RenderingHints
to use.
May be null
.- Returns:
- The
RenderedOp
destination. - Throws:
IllegalArgumentException
- if source0
is null
.- See Also:
JAI
,
ParameterBlockJAI
,
RenderedOp