it.geosolutions.jaiext.mosaic
Class MosaicDescriptor

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

public class MosaicDescriptor
extends javax.media.jai.OperationDescriptorImpl

This class is very similar to the Mosaic operation because it returns a composition of various images of the same type (same bands and same dataType). This mosaic implementation has two main differences from the first:

This new behavior can be summarized with this code:

The operation parameters are:

The no data support is provided using the Range class in the JAITools package. This class contains one value or a group of contiguous values and it is used for checking if every source pixel is contained into. If True, it means that the selected pixel is a no data value.

In this Mosaic implementation the no data support has been added for geospatial images mosaic elaborations. In that images the there could be different type of nodata and a simple thresholding operation couldn't be enough for avoiding image artifacts.

The ROI and alpha mosaic type are equal to those of the classic MosaicOp.

See Also:
MosaicOpImage2, 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
MosaicDescriptor()
          Constructor.
 
Method Summary
static javax.media.jai.RenderedOp create(RenderedImage[] sources, ImageMosaicBean[] bean, javax.media.jai.operator.MosaicType mosaicType, double[] destinationNoData, RenderingHints renderingHints)
          RenderedOp creation method that takes all the parameters, passes them to the ParameterBlockJAI and then call the JAI create method for the mosaic operation with no data support.
 boolean isRenderableSupported()
          Check if the Renderable mode is supported
 boolean validateParameters(ParameterBlock pb)
          This method check if the parameters are suitable for the operation.
 
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

MosaicDescriptor

public MosaicDescriptor()
Constructor.

Method Detail

isRenderableSupported

public boolean isRenderableSupported()
Check if the Renderable mode is supported

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

validateParameters

public boolean validateParameters(ParameterBlock pb)
This method check if the parameters are suitable for the operation.

Parameters:
pb - The ParameterBlock containing the values to check
Returns:
True only if all the parameters are valid.

create

public static javax.media.jai.RenderedOp create(RenderedImage[] sources,
                                                ImageMosaicBean[] bean,
                                                javax.media.jai.operator.MosaicType mosaicType,
                                                double[] destinationNoData,
                                                RenderingHints renderingHints)
RenderedOp creation method that takes all the parameters, passes them to the ParameterBlockJAI and then call the JAI create method for the mosaic operation with no data support.

Parameters:
sources - The RenderdImage source array used for the operation.
bean - The Java Bean used for storing image data, ROI and alpha channel if present, and no data Range.
mosaicType - This field sets which type of mosaic operation must be executed.
destinationNoData - This value fills the image pixels that contain no data.
renderingHints - This value sets the rendering hints for the operation.
Returns:
A RenderedOp that performs the mosaic operation with no data support.


Copyright © 2006–2015 GeoSolutions. All rights reserved.