jaitools.media.jai.kernelstats
Class KernelStatsDescriptor

java.lang.Object
  extended by javax.media.jai.OperationDescriptorImpl
      extended by jaitools.media.jai.kernelstats.KernelStatsDescriptor
All Implemented Interfaces:
Serializable, javax.media.jai.OperationDescriptor, javax.media.jai.RegistryElementDescriptor

public class KernelStatsDescriptor
extends javax.media.jai.OperationDescriptorImpl

An OperationDescriptor for the "KernelStats" operation.

For each pixel in the input image, a range of summary statistics can be calculated for the values in the pixel's neighbourhood, which is defined using a KernelJAI object.

Two masking options are provided:

The two options may be used together.

Since:
1.0
Version:
$Id: KernelStatsDescriptor.java 1383 2011-02-10 11:22:29Z michael.bedward $
Author:
Michael Bedward
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Fields inherited from interface javax.media.jai.OperationDescriptor
NO_PARAMETER_DEFAULT
 
Constructor Summary
KernelStatsDescriptor()
          Constructor.
 
Method Summary
static RenderedImage create(RenderedImage source0, Statistic[] stats, javax.media.jai.KernelJAI kernel, int band, javax.media.jai.ROI roi, Boolean maskSource, Boolean maskDest, Boolean ignoreNaN, Number nilValue, RenderingHints hints)
          Convenience method which constructs a ParameterBlockJAI and invokes JAI.create("kernelstats", params)
 boolean validateArguments(String modeName, ParameterBlock pb, StringBuffer msg)
           
 
Methods inherited from class javax.media.jai.OperationDescriptorImpl
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, 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

KernelStatsDescriptor

public KernelStatsDescriptor()
Constructor.

Method Detail

create

public static RenderedImage create(RenderedImage source0,
                                   Statistic[] stats,
                                   javax.media.jai.KernelJAI kernel,
                                   int band,
                                   javax.media.jai.ROI roi,
                                   Boolean maskSource,
                                   Boolean maskDest,
                                   Boolean ignoreNaN,
                                   Number nilValue,
                                   RenderingHints hints)
Convenience method which constructs a ParameterBlockJAI and invokes JAI.create("kernelstats", params)

Parameters:
source0 - the image for which neighbourhood statistics are required
stats - an array specifying the statistics required
kernel - a kernel defining the neighbourhood
band - the source image band to process (default 0)
roi - optional roi (default is null) used for source and/or destination masking
maskSource - if TRUE only the values of source pixels where roi.contains is true contribute to the calculation
maskDest - if TRUE the statistic is only calculated for pixels where roi.contains is true; when false the destination pixel is set to NaN
ignoreNaN - if TRUE, NaN values in input float or double images are ignored in calculations
nilValue - value to write to destination when there is no calculated statistic for a pixel (e.g. due to destination masking or NaNs in neighbourhood)
hints - useful for specifying a border extender; may be null
Returns:
a RenderedImages a band for each requested statistic
Throws:
IllegalArgumentException - if any args are null

validateArguments

public boolean validateArguments(String modeName,
                                 ParameterBlock pb,
                                 StringBuffer msg)
Specified by:
validateArguments in interface javax.media.jai.OperationDescriptor
Overrides:
validateArguments in class javax.media.jai.OperationDescriptorImpl


Copyright © 2009-2011. All Rights Reserved.