javax.media.jai.operator
Class BinarizeDescriptor

java.lang.Object
  |
  +--javax.media.jai.OperationDescriptorImpl
        |
        +--javax.media.jai.operator.BinarizeDescriptor
All Implemented Interfaces:
OperationDescriptor, RegistryElementDescriptor, Serializable

public class BinarizeDescriptor
extends OperationDescriptorImpl

An OperationDescriptor describing the "Binarize" operation.

The "Binarize" operation takes one rendered or renderable single-banded source image and a threshold value and applies a thresholding operation to the produce a bilevel image.

By default the destination image bounds are equal to those of the source image. The SampleModel of the destination image is an instance of MultiPixelPackedSampleModel.

The pseudocode for "Binarize" is as follows:

 
      dst(x, y) = src(x, y) >= threshold ? 1 : 0;
 

Resource List
Name Value
GlobalName Binarize
LocalName Binarize
Vendor com.sun.media.jai
Description Thresholds an image into a bilevel image.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/BinarizeDescriptor.html
Version 1.1
arg0Desc The threshold value.

Parameter List
Name Class Type Default Value
threshold java.lang.Double NO_PARAMETER_DEFAULT

Since:
JAI 1.1
See Also:
OperationDescriptor, Serialized Form

Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Constructor Summary
BinarizeDescriptor()
          Constructor.
 
Method Summary
protected  boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)
          Validates the input source.
 
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, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinarizeDescriptor

public BinarizeDescriptor()
Constructor.
Method Detail

validateSources

protected boolean validateSources(String modeName,
                                  ParameterBlock args,
                                  StringBuffer msg)
Validates the input source.

In addition to the standard checks performed by the superclass method, this method checks that the source image is single-banded.

Overrides:
validateSources in class OperationDescriptorImpl
Tags copied from class: OperationDescriptorImpl
Parameters:
modeName - the operation mode name
args - a ParameterBlock that has the sources
msg - A string that may contain error messages.
Throws:
IllegalArgumentException - if any of the input parameters are null.
See Also:
OperationDescriptorImpl.validateArguments(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)