public class MosaicDescriptor
extends javax.media.jai.OperationDescriptorImpl
// s[i][x][y] = pixel value for the source i // d[x][y] = pixel value of the destination d[x][y] = destinationNoData; for (int i=0; i< sources.length(); i++) { if (!SourceNoDataRange[i].contains(s[i][x][y]) { d[x][y] = s[i][x][y]; break; } }
// s[i][x][y] = pixel value for the source i // w[i][x][y] = weigthed value of the destination w[i][x][y] = 0; for (int i=0; i< sources.length(); i++) { if (!SourceNoDataRange[i].contains(s[i][x][y]) { w[i][x][y] = 1; } }
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.
MosaicOpImage
,
Serialized FormConstructor and Description |
---|
MosaicDescriptor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage[] sources,
javax.media.jai.operator.MosaicType mosaicType,
javax.media.jai.PlanarImage[] sourceAlpha,
javax.media.jai.ROI[] sourceROI,
double[][] sourceThreshold,
double[] backgroundValues,
Range[] nodata,
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
|
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()
isRenderableSupported
in interface javax.media.jai.OperationDescriptor
isRenderableSupported
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(RenderedImage[] sources, javax.media.jai.operator.MosaicType mosaicType, javax.media.jai.PlanarImage[] sourceAlpha, javax.media.jai.ROI[] sourceROI, double[][] sourceThreshold, double[] backgroundValues, Range[] nodata, RenderingHints renderingHints)
sources
- The RenderdImage source array used for the operation.mosaicType
- This field sets which type of mosaic operation must be
executed.sourceAlpha
- source alpha bandssourceROI
- source ROIsourceThreshold
- source thresholdsbackgroundValues
- This value fills the image pixels that contain no
data.nodata
- array of NoData Range
used for checking nodata valuesrenderingHints
- This value sets the rendering hints for the operation.Copyright © 2006–2015 GeoSolutions. All rights reserved.