public class BandSelectDescriptor
extends javax.media.jai.OperationDescriptorImpl
OperationDescriptor
describing the "BandSelect" operation.
The BandSelect operation chooses N
bands from a
rendered or renderable source image and copies the pixel data of
these bands to the destination image in the order specified. The
bandIndices
parameter specifies the source band
indices, and its size (bandIndices.length
) determines
the number of bands of the destination image. The destination
image may have ay number of bands, and a particular band of the
source image may be repeated in the destination image by specifying
it multiple times in the bandIndices
parameter.
Each of the bandIndices
value should be a valid
band index number of the source image. For example, if the source
only has two bands, then 1 is a valid band index, but 3 is not. The
first band is numbered 0.
The destination pixel values are defined by the pseudocode:
dst[x][y][b] = src[x][y][bandIndices[b]];
Name | Value |
---|---|
GlobalName | BandSelect |
LocalName | BandSelect |
Vendor | com.sun.media.jai |
Description | Selects n number of bands from an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/BandSelectDescriptor.html |
Version | 1.0 |
arg0Desc | The indices of the selected bands. |
Name | Class Type | Default Value |
---|---|---|
bandIndices | int[] | NO_PARAMETER_DEFAULT |
OperationDescriptor
,
Serialized FormConstructor and Description |
---|
BandSelectDescriptor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage source0,
int[] bandIndices,
RenderingHints hints)
Selects n number of bands from an image.
|
static javax.media.jai.RenderableOp |
createRenderable(RenderableImage source0,
int[] bandIndices,
RenderingHints hints)
Selects n number of bands from an image.
|
boolean |
validateArguments(String modeName,
ParameterBlock args,
StringBuffer message)
Validates the input source and parameters.
|
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, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
public boolean validateArguments(String modeName, ParameterBlock args, StringBuffer message)
In addition to the standard checks performed by the superclass method, this method checks that "bandIndices" has a length of at least 1 and does not contain any values less than 0 or greater than the number of source bands minus 1.
validateArguments
in interface javax.media.jai.OperationDescriptor
validateArguments
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(RenderedImage source0, int[] bandIndices, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.bandIndices
- The indices of the selected bands.hints
- The RenderingHints
to use.
May be null
.RenderedOp
destination.IllegalArgumentException
- if source0
is null
.IllegalArgumentException
- if bandIndices
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static javax.media.jai.RenderableOp createRenderable(RenderableImage source0, int[] bandIndices, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
source0
- RenderableImage
source 0.bandIndices
- The indices of the selected bands.hints
- The RenderingHints
to use.
May be null
.RenderableOp
destination.IllegalArgumentException
- if source0
is null
.IllegalArgumentException
- if bandIndices
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
Copyright © 2006–2018 GeoSolutions. All rights reserved.