public class BinarizeDescriptor
extends OperationDescriptorImpl
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. Users can define ROI on where the pixel must be calculated, keeping external pixel to 0. Also it is possible to define a nodata variable for setting NoData values always to 0.
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 | it.geosolutions.jaiext | |
Description | Thresholds a single banded 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. | |
arg1Desc | The ROI value. | |
arg2Desc | The nodata value. |
Name | Class Type | Default Value |
---|---|---|
threshold | java.lang.Double | NO_PARAMETER_DEFAULT |
roi | javax.media.jai.ROI | null |
nodata | it.geosolutions.jaiext.range.Range | null |
Constructor and Description |
---|
BinarizeDescriptor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static RenderedOp |
create(RenderedImage source0,
Double threshold,
ROI roi,
Range nodata,
RenderingHints hints)
Binarize an image from a threshold value, taking into account the presence of ROI and NoData
Creates a
ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(String,ParameterBlock,RenderingHints) . |
static RenderableOp |
createRenderable(RenderableImage source0,
Double threshold,
ROI roi,
Range nodata,
RenderingHints hints)
Binarize an image from a threshold value, taking into account the presence of ROI and NoData
Creates a
ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints) . |
protected boolean |
validateSources(String modeName,
ParameterBlock args,
StringBuffer msg)
Validates the input source.
|
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
protected boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)
It also checks if the input image is single banded
validateSources
in class OperationDescriptorImpl
public static RenderedOp create(RenderedImage source0, Double threshold, ROI roi, Range nodata, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.threshold
- It must be of type java.lang.Double.roi
- ROI object.nodata
- NoData Range to use in calculation.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, ROI roi, Range nodata, 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.roi
- ROI object.nodata
- NoData Range to use in calculation.hints
- The RenderingHints
to use.
May be null
.RenderableOp
destination.IllegalArgumentException
- if source0
is null
.IllegalArgumentException
- if threshold
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
Copyright © 2006–2018 GeoSolutions. All rights reserved.