public class ColorConvertDescriptor
extends javax.media.jai.OperationDescriptorImpl
OperationDescriptor
describing the "ColorConvert" operation.
The "ColorConvert" operation performs a pixel-by-pixel color conversion of the data in a rendered or renderable source image.
The data are treated as having no alpha channel, i.e., all bands are color bands. The color space of the source image is specified by the
ColorSpace
object of the source image ColorModel
which must not be null
. The color space of the destination
image is specified by the ColorSpace
of the "colorModel" parameter which must be a ColorModel
. If a
ColorModel
is suggested via the RenderingHints
it is ignored.
The calculation pathway is selected to optimize performance and accuracy based on which ColorSpace
subclasses are used to represent
the source and destination color spaces. The subclass categories are ICC_ColorSpace
, ColorSpaceJAI
, and generic
ColorSpace
, i.e., one which is not an instance of either the two aforementioned subclasses. Note that in the Sun Microsystems
implementation, an ICC_ColorSpace
instance is what is returned by ColorSpace.getInstance()
.
Integral data are assumed to occupy the full range of the respective data type; floating point data are assumed to be normalized to the range [0.0,1.0].
By default, the destination image bounds, data type, and number of bands are the same as those of the source image.
Optionally users may define a NoData Range or a ROI in order to mask unwanted values or to reduce active area calculation
Name | Value | |
---|---|---|
GlobalName | ColorConvert | |
LocalName | ColorConvert | |
Vendor | it.geosolutions.jaiext | |
Description | Converts the colorspace of an Image taking into account ROI and NoData. | |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ColorConvertDescriptor.html | |
Version | 1.0 | |
arg0Desc | The destination ColorModel . |
|
arg1Desc | The ROI defining active Area. | |
arg2Desc | The NoData Range used for checking if a pixel is valid. | |
arg2Desc | The destination noData parameter. |
Name | Class Type | Default Value |
---|---|---|
colorModel | java.awt.image.ColorModel | NO_PARAMETER_DEFAULT |
roi | javax.media.jai.ROI | null |
nodata | it.geosolutions.jaiext.Range | null |
destNoData | double[] | new double[]{0.0} |
Constructor and Description |
---|
ColorConvertDescriptor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage source0,
ColorModel colorModel,
javax.media.jai.ROI roi,
Range nodata,
double[] destinationNoData,
RenderingHints hints)
Convert the color space of an image.
|
static javax.media.jai.RenderableOp |
createRenderable(RenderableImage source0,
ColorModel colorModel,
javax.media.jai.ROI roi,
Range nodata,
double[] destinationNoData,
RenderingHints hints)
Convert the color space of an image.
|
boolean |
isRenderableSupported()
Returns
true since renderable operation is supported. |
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, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
public boolean isRenderableSupported()
true
since renderable operation is supported.isRenderableSupported
in interface javax.media.jai.OperationDescriptor
isRenderableSupported
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(RenderedImage source0, ColorModel colorModel, javax.media.jai.ROI roi, Range nodata, double[] destinationNoData, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.colorModel
- The destination color space.roi
- Optional ROI defining calculation areanodata
- Optional NoData range used for checking if a pixel is a nodatadestNoData
- Optional value used for output NoDatahints
- The RenderingHints
to use. May be null
.RenderedOp
destination.JAI
,
ParameterBlockJAI
,
RenderedOp
public static javax.media.jai.RenderableOp createRenderable(RenderableImage source0, ColorModel colorModel, javax.media.jai.ROI roi, Range nodata, double[] destinationNoData, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
source0
- RenderableImage
source 0.colorModel
- The destination color space.roi
- Optional ROI defining calculation areanodata
- Optional NoData range used for checking if a pixel is a nodatadestNoData
- Optional value used for output NoDatahints
- The RenderingHints
to use. May be null
.RenderableOp
destination.JAI
,
ParameterBlockJAI
,
RenderableOp
Copyright © 2006–2015 GeoSolutions. All rights reserved.