jaitools.media.jai.regionalize
Class RegionalizeDescriptor

java.lang.Object
  extended by javax.media.jai.OperationDescriptorImpl
      extended by jaitools.media.jai.regionalize.RegionalizeDescriptor
All Implemented Interfaces:
java.io.Serializable, javax.media.jai.OperationDescriptor, javax.media.jai.RegistryElementDescriptor

public class RegionalizeDescriptor
extends javax.media.jai.OperationDescriptorImpl

Describes the "Regionalize" operation.

This operation takes a single source image and identifies regions of connected pixels with uniform value, where value comparisons take into account a user-specified tolerance.

Note: At present, this operator only deals with a single specified band.

A pixel is connected to another pixel if a path can be defined between them that only passes through pixels with the same value, taking unit steps horizontally, vertically and, optionally, diagonally.

Each region that is identified in the source image is allocated a unique integer ID. The product of the operation is an image with data of TYPE_INT, where each pixel has its region ID as its value. A RegionData object is also returned as a property of the output image. It can be retrieved by calling the getProperty method on this operator with "regiondata" as the property name (this name can also be referred to with REGION_DATA_PROPERTY).

Parameters

NameTypeDefault value
bandint0
tolerancedouble0d
diagonalbooleanfalse

Since:
1.0
Version:
$Id: RegionalizeDescriptor.java 1030 2009-11-11 07:31:50Z michael.bedward $
Author:
Michael Bedward
See Also:
Serialized Form

Field Summary
static java.lang.String REGION_DATA_PROPERTY
          The propoerty name to retrieve the RegionData object which holds summary data for regions identified in the source image and depicted in the destination image
 
Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Fields inherited from interface javax.media.jai.OperationDescriptor
NO_PARAMETER_DEFAULT
 
Constructor Summary
RegionalizeDescriptor()
          Constructor.
 
Method Summary
 boolean arePropertiesSupported()
           
static javax.media.jai.RenderedOp create(java.awt.image.RenderedImage source0, int band, double tolerance, boolean diagonal, java.awt.RenderingHints hints)
          Convenience method which constructs a ParameterBlockJAI and invokes JAI.create("regionalize", params) .
 
Methods inherited from class javax.media.jai.OperationDescriptorImpl
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, 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
 

Field Detail

REGION_DATA_PROPERTY

public static final java.lang.String REGION_DATA_PROPERTY
The propoerty name to retrieve the RegionData object which holds summary data for regions identified in the source image and depicted in the destination image

See Also:
Constant Field Values
Constructor Detail

RegionalizeDescriptor

public RegionalizeDescriptor()
Constructor.

Method Detail

arePropertiesSupported

public boolean arePropertiesSupported()
Specified by:
arePropertiesSupported in interface javax.media.jai.RegistryElementDescriptor
Overrides:
arePropertiesSupported in class javax.media.jai.OperationDescriptorImpl

create

public static javax.media.jai.RenderedOp create(java.awt.image.RenderedImage source0,
                                                int band,
                                                double tolerance,
                                                boolean diagonal,
                                                java.awt.RenderingHints hints)
Convenience method which constructs a ParameterBlockJAI and invokes JAI.create("regionalize", params) . If an ImageLayout object is included in the RenderingHints passed to this method, any specification of the SampleModel for the destination image will be overridden such that the destination will always be TYPE_INT.

Parameters:
source0 - the image to be regionalized
band - the band to process
tolerance - tolerance for pixel value comparisons
diagonal - true to include diagonal connections; false for only orthogonal connections
hints - rendering hints (may be null)
Returns:
the RenderedOp destination


Copyright © 2009-2010. All Rights Reserved.