|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.jai.OperationDescriptorImpl javax.media.jai.operator.BandSelectDescriptor
An 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 FormField Summary |
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
sourceNames |
Fields inherited from interface javax.media.jai.OperationDescriptor |
NO_PARAMETER_DEFAULT |
Constructor Summary | |
BandSelectDescriptor()
Constructor. |
Method Summary | |
static RenderedOp |
create(RenderedImage source0,
int[] bandIndices,
RenderingHints hints)
Selects n number of bands from an image. |
static 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BandSelectDescriptor()
Method Detail |
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 OperationDescriptor
validateArguments
in class OperationDescriptorImpl
modeName
- the operation mode nameargs
- Input arguments, including source(s) and/or parameter(s).message
- A string that may contain error messages.OperationDescriptorImpl.validateSources(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
,
OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
public static 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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |