org.geotoolkit.image.jai
Class Combine.Dyadic

Object
  extended by PlanarImage
      extended by OpImage
          extended by PointOpImage
              extended by Combine
                  extended by Combine.Dyadic
All Implemented Interfaces:
RenderedImage, ImageJAI, PropertyChangeEmitter, PropertySource, WritablePropertySource
Enclosing class:
Combine

public static class Combine.Dyadic
extends Combine

Optimized Combine operation for dyadic (two sources) image. This operation performs a linear combination of two images (src0 and src1). The parameters scale0 and scale1 indicate the scale of source images src0 and src1. If we consider pixel at coordinate (x,y), its value is determinate by the pseudo-code:

value = src0[x][y]*scale0 + src1[x][y]*scale1 + offset

Since:
2.1
Version:
3.00
Author:
Rémi Eve (IRD), Martin Desruisseaux (IRD)
Module:
coverage/geotk-coverage (download)    View source code for this class

Nested Class Summary
 
Nested classes/interfaces inherited from class Combine
Combine.Dyadic, Combine.Transform
 
Field Summary
 
Fields inherited from class Combine
OPERATION_NAME, transform
 
Fields inherited from class OpImage
cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler
 
Fields inherited from class PlanarImage
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
 
Constructor Summary
Combine.Dyadic(Vector<? extends RenderedImage> images, double[][] matrix, RenderingHints hints)
          Constructs a new instance of Combine.Dyadic.
 
Method Summary
 void computeRect(PlanarImage[] images, WritableRaster dest, Rectangle destRect)
          Computes one tile.
 
Methods inherited from class Combine
getSources
 
Methods inherited from class PointOpImage
computeTile, dispose, isColormapOperation, mapDestRect, mapSourceRect, permitInPlaceOperation
 
Methods inherited from class OpImage
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, mapDestPoint, mapSourcePoint, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize
 
Methods inherited from class PlanarImage
addPropertyChangeListener, addPropertyChangeListener, addSink, addSink, addSource, addTileComputationListener, copyData, copyData, copyExtendedData, createColorModel, createSnapshot, createWritableRaster, finalize, getAsBufferedImage, getAsBufferedImage, getBounds, getColorModel, getData, getData, getDefaultColorModel, getExtendedData, getGraphics, getHeight, getImageID, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumBands, getNumSources, getNumXTiles, getNumYTiles, getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames, getSampleModel, getSinks, getSource, getSourceImage, getSourceObject, getSplits, getTileComputationListeners, getTileFactory, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileIndices, getTileRect, getTiles, getTileWidth, getWidth, overlapsMultipleTiles, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeSink, removeSink, removeSinks, removeSource, removeSources, removeTileComputationListener, setImageLayout, setProperties, setProperty, setSource, setSources, tileXToX, tileXToX, tileYToY, tileYToY, toString, wrapRenderedImage, XToTileX, XToTileX, YToTileY, YToTileY
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Combine.Dyadic

public Combine.Dyadic(Vector<? extends RenderedImage> images,
                      double[][] matrix,
                      RenderingHints hints)
               throws MismatchedSizeException
Constructs a new instance of Combine.Dyadic.

Parameters:
images - The rendered sources. This vector must contains exactly 2 sources.
matrix - The linear combination coefficients as a matrix.
hints - The rendering hints.
Throws:
MismatchedSizeException - if some rows in the matrix argument doesn't have the expected length.
Method Detail

computeRect

public void computeRect(PlanarImage[] images,
                        WritableRaster dest,
                        Rectangle destRect)
Computes one tile.

Overrides:
computeRect in class Combine
Parameters:
images - The source images.
dest - The raster to be filled in.
destRect - The region within the raster to be filled.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.