it.geosolutions.jaiext.bandmerge
Class BandMergeDescriptor

java.lang.Object
  extended by javax.media.jai.OperationDescriptorImpl
      extended by it.geosolutions.jaiext.bandmerge.BandMergeDescriptor
All Implemented Interfaces:
Serializable, javax.media.jai.OperationDescriptor, javax.media.jai.RegistryElementDescriptor

public class BandMergeDescriptor
extends javax.media.jai.OperationDescriptorImpl

An OperationDescriptor describing the "BandMerge" operation.

The BandMerge operation takes two or more rendered or renderable images, and performs the merging of all the image bands inside a singular multibanded image. Each source image should be non-null. The number of bands of the destination image is the sum of those of all source images.

All the bands of source images are ordered in the order given in a ParameterBlock. If image1 has three bands and image2 has one band, the merged image has 4 bands. Three grayscale images can be used to merge into an RGB image in this way. The destination image bound is the intersection of the source image bounds. If the sources don't intersect, the destination will have a width and height of 0. If No Data values are present, then the user can define an array of Range objects(each one for an image) for the No Data and a double value called "destination" no data which will be set instead of the old No data value. If the array length is smaller than that of the input images, then the first Range object is taken. If the user wants to do a backward mapping from the destination pixels to each source image pixel, then he must add a parameter called "transformations". This parameter is a List of the transformations to perform on each image. Note that the list size must be equal to that of the sources, because each transformation must be related to only one image. The user should remember that these transformations have to map from the destination image to the source image and not the opposite.

Resource List
Name Value
GlobalName BandMergeOp
LocalName BandMergeOp
Vendor it.geosolutions.jaiext.roiaware
Description Operation used for merging multiple images into a single multibanded image.
DocURL Not Defined
Version 1.0
arg0Desc NoData values.
arg1Desc Destination No Data value.
arg2Desc Transformations List.
arg3Desc ROI object to use.

Parameter List
Name Class Type Default Value
noData Range[] null
destinationNoData Double 0
transformations java.util.List null
roi javax.media.jai.ROI null

See Also:
OperationDescriptor, Serialized Form

Field Summary
 
Fields inherited from class javax.media.jai.OperationDescriptorImpl
sourceNames, supportedModes
 
Fields inherited from interface javax.media.jai.OperationDescriptor
NO_PARAMETER_DEFAULT
 
Constructor Summary
BandMergeDescriptor()
          Constructor.
 
Method Summary
static javax.media.jai.RenderedOp create(Range[] noData, double destinationNoData, RenderingHints hints, List<AffineTransform> transform, RenderedImage... sources)
          Merge (possibly multi-banded)images into a multibanded image.
static javax.media.jai.RenderedOp create(Range[] noData, double destinationNoData, RenderingHints hints, List<AffineTransform> transform, javax.media.jai.ROI roi, RenderedImage... sources)
          Merge (possibly multi-banded)images into a multibanded image.
static javax.media.jai.RenderedOp create(Range[] noData, double destinationNoData, RenderingHints hints, RenderedImage... sources)
          Merge (possibly multi-banded)images into a multibanded image.
static javax.media.jai.RenderableOp createRenderable(Range[] noData, double destinationNoData, RenderingHints hints, List<AffineTransform> transform, RenderableImage... sources)
          Merge (possibly multi-banded)images into a multibanded image.
static javax.media.jai.RenderableOp createRenderable(Range[] noData, double destinationNoData, RenderingHints hints, List<AffineTransform> transform, javax.media.jai.ROI roi, RenderableImage... sources)
          Merge (possibly multi-banded)images into a multibanded image.
static javax.media.jai.RenderableOp createRenderable(Range[] noData, double destinationNoData, RenderingHints hints, RenderableImage... sources)
          Merge (possibly multi-banded)images into a multibanded image.
 boolean isRenderableSupported()
          Returns true since renderable operation is supported.
 
Methods inherited from class javax.media.jai.OperationDescriptorImpl
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandMergeDescriptor

public BandMergeDescriptor()
Constructor.

Method Detail

isRenderableSupported

public boolean isRenderableSupported()
Returns true since renderable operation is supported.

Specified by:
isRenderableSupported in interface javax.media.jai.OperationDescriptor
Overrides:
isRenderableSupported in class javax.media.jai.OperationDescriptorImpl

create

public static javax.media.jai.RenderedOp create(Range[] noData,
                                                double destinationNoData,
                                                RenderingHints hints,
                                                RenderedImage... sources)
Merge (possibly multi-banded)images into a multibanded image.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.create(String,ParameterBlock,RenderingHints).

Parameters:
noData - Array of input No Data Ranges.
destinationNoData - value used by the RenderedOp for setting the output no data value.
hints - The RenderingHints to use. May be null.
sources - Array of source RenderedImage.
Returns:
The RenderedOp destination.
Throws:
IllegalArgumentException - if sources is null.
IllegalArgumentException - if a source is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp

create

public static javax.media.jai.RenderedOp create(Range[] noData,
                                                double destinationNoData,
                                                RenderingHints hints,
                                                List<AffineTransform> transform,
                                                RenderedImage... sources)
Merge (possibly multi-banded)images into a multibanded image.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.create(String,ParameterBlock,RenderingHints).

Parameters:
noData - Array of input No Data Ranges.
destinationNoData - value used by the RenderedOp for setting the output no data value.
hints - The RenderingHints to use. May be null.
transform - A List of AffineTransformation to use for backward mapping each source image. May be null.
sources - Array of source RenderedImage.
Returns:
The RenderedOp destination.
Throws:
IllegalArgumentException - if sources is null.
IllegalArgumentException - if a source is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp

create

public static javax.media.jai.RenderedOp create(Range[] noData,
                                                double destinationNoData,
                                                RenderingHints hints,
                                                List<AffineTransform> transform,
                                                javax.media.jai.ROI roi,
                                                RenderedImage... sources)
Merge (possibly multi-banded)images into a multibanded image.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.create(String,ParameterBlock,RenderingHints).

Parameters:
noData - Array of input No Data Ranges.
destinationNoData - value used by the RenderedOp for setting the output no data value.
hints - The RenderingHints to use. May be null.
transform - A List of AffineTransformation to use for backward mapping each source image. May be null.
roi - Input ROI object to use in the bandmerge operation.
sources - Array of source RenderedImage.
Returns:
The RenderedOp destination.
Throws:
IllegalArgumentException - if sources is null.
IllegalArgumentException - if a source is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp

createRenderable

public static javax.media.jai.RenderableOp createRenderable(Range[] noData,
                                                            double destinationNoData,
                                                            RenderingHints hints,
                                                            RenderableImage... sources)
Merge (possibly multi-banded)images into a multibanded image.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.createRenderable(String,ParameterBlock,RenderingHints).

Parameters:
noData - Array of input No Data Ranges.
destinationNoData - value used by the RenderableOp for setting the output no data value.
hints - The RenderingHints to use. May be null.
sources - Array of source RenderableImage.
Returns:
The RenderableOp destination.
Throws:
IllegalArgumentException - if sources is null.
IllegalArgumentException - if a source is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp

createRenderable

public static javax.media.jai.RenderableOp createRenderable(Range[] noData,
                                                            double destinationNoData,
                                                            RenderingHints hints,
                                                            List<AffineTransform> transform,
                                                            RenderableImage... sources)
Merge (possibly multi-banded)images into a multibanded image.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.createRenderable(String,ParameterBlock,RenderingHints).

Parameters:
noData - Array of input No Data Ranges.
destinationNoData - value used by the RenderableOp for setting the output no data value.
hints - The RenderingHints to use. May be null.
transform - A List of AffineTransformation to use for backward mapping each source image. May be null.
sources - Array of source RenderableImage.
Returns:
The RenderableOp destination.
Throws:
IllegalArgumentException - if sources is null.
IllegalArgumentException - if a source is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp

createRenderable

public static javax.media.jai.RenderableOp createRenderable(Range[] noData,
                                                            double destinationNoData,
                                                            RenderingHints hints,
                                                            List<AffineTransform> transform,
                                                            javax.media.jai.ROI roi,
                                                            RenderableImage... sources)
Merge (possibly multi-banded)images into a multibanded image.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.createRenderable(String,ParameterBlock,RenderingHints).

Parameters:
noData - Array of input No Data Ranges.
destinationNoData - value used by the RenderableOp for setting the output no data value.
hints - The RenderingHints to use. May be null.
transform - A List of AffineTransformation to use for backward mapping each source image. May be null.
roi - Input ROI object to use in the bandmerge operation.
sources - Array of source RenderableImage.
Returns:
The RenderableOp destination.
Throws:
IllegalArgumentException - if sources is null.
IllegalArgumentException - if a source is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp


Copyright © 2006–2014 GeoSolutions. All rights reserved.