|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.jai.OperationDescriptorImpl
javax.media.jai.operator.BinarizeDescriptor
public class BinarizeDescriptor
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;
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. |
Name | Class Type | Default Value |
---|---|---|
threshold | java.lang.Double | NO_PARAMETER_DEFAULT |
OperationDescriptor
,
Serialized FormField Summary |
---|
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
---|
sourceNames |
Fields inherited from interface javax.media.jai.OperationDescriptor |
---|
NO_PARAMETER_DEFAULT |
Constructor Summary | |
---|---|
BinarizeDescriptor()
Constructor. |
Method Summary | |
---|---|
static RenderedOp |
create(RenderedImage source0,
Double threshold,
RenderingHints hints)
Binarize an image from a threshold value. |
static RenderableOp |
createRenderable(RenderableImage source0,
Double threshold,
RenderingHints hints)
Binarize an image from a threshold value. |
protected boolean |
validateSources(String modeName,
ParameterBlock args,
StringBuffer msg)
Validates the input source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinarizeDescriptor()
Method Detail |
---|
protected boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)
In addition to the standard checks performed by the superclass method, this method checks that the source image is single-banded.
validateSources
in class OperationDescriptorImpl
modeName
- the operation mode nameargs
- a ParameterBlock
that has the sourcesmsg
- A string that may contain error messages.OperationDescriptorImpl.validateArguments(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
public static RenderedOp create(RenderedImage source0, Double threshold, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.threshold
- Argment must be of type java.lang.Double.hints
- The RenderingHints
to use.
May be null
.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.
IllegalArgumentException
- if threshold
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static RenderableOp createRenderable(RenderableImage source0, Double threshold, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
source0
- RenderableImage
source 0.threshold
- Argment must be of type java.lang.Double.hints
- The RenderingHints
to use.
May be null
.
RenderableOp
destination.
IllegalArgumentException
- if source0
is null
.
IllegalArgumentException
- if threshold
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |