it.geosolutions.jaiext.scale
Class ScaleNearestOpImage2

java.lang.Object
  extended by javax.media.jai.PlanarImage
      extended by javax.media.jai.OpImage
          extended by javax.media.jai.GeometricOpImage
              extended by it.geosolutions.jaiext.scale.ScaleOpImage
                  extended by it.geosolutions.jaiext.scale.ScaleNearestOpImage2
All Implemented Interfaces:
RenderedImage, javax.media.jai.ImageJAI, javax.media.jai.PropertyChangeEmitter, javax.media.jai.PropertySource, javax.media.jai.WritablePropertySource

public class ScaleNearestOpImage2
extends ScaleOpImage

This test class contains the same code of the ScaleNearestOpImage class but with a difference inside the byteLoop, shortLoop,... The code is more compact and avoid the use of multiple cycles for every case(presence or absence of ROI and No Data). The inconvenient with this class is that its performance are worst than that of the ScaleNearestOpImage class. For this reason this class is never used inside the project, but is kept for future modification.


Field Summary
protected  InterpolationNearest interpN
          Nearest-Neighbor interpolator
 
Fields inherited from class it.geosolutions.jaiext.scale.ScaleOpImage
caseA, caseB, caseC, dataType, destinationNoDataByte, destinationNoDataDouble, destinationNoDataFloat, destinationNoDataInt, destinationNoDataShort, destinationNoDataUShort, hasNoData, hasROI, interp_height, interp_left, interp_top, interp_width, interpolator, invScaleXFrac, invScaleXInt, invScaleXRational, invScaleXRationalDenom, invScaleXRationalNum, invScaleYFrac, invScaleYInt, invScaleYRational, invScaleYRationalDenom, invScaleYRationalNum, isBicubicNew, isBilinearNew, isBinary, isNearestNew, isNegativeInf, isPositiveInf, isRangeNaN, noData, one, precisionBits, rationalTolerance, roiBounds, roiIter, round, round2, scaleX, scaleXRational, scaleXRationalDenom, scaleXRationalNum, scaleY, scaleYRational, scaleYRationalDenom, scaleYRationalNum, shift, shift2, srcROI, srcROIImage, subsampleBits, transX, transXRational, transXRationalDenom, transXRationalNum, transY, transYRational, transYRationalDenom, transYRationalNum, useRoiAccessor
 
Fields inherited from class javax.media.jai.GeometricOpImage
backgroundValues, computableBounds, extender, intBackgroundValues, interp, setBackground
 
Fields inherited from class javax.media.jai.OpImage
cache, cobbleSources, OP_COMPUTE_BOUND, OP_IO_BOUND, OP_NETWORK_BOUND, tileCacheMetric, tileRecycler
 
Fields inherited from class javax.media.jai.PlanarImage
colorModel, eventManager, height, minX, minY, properties, sampleModel, tileFactory, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
 
Constructor Summary
ScaleNearestOpImage2(RenderedImage source, javax.media.jai.ImageLayout layout, Map configuration, javax.media.jai.BorderExtender extender, javax.media.jai.Interpolation interp, float scaleX, float scaleY, float transX, float transY, boolean useRoiAccessor)
           
 
Method Summary
protected  void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)
           
protected  void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect, Raster[] rois)
           
 
Methods inherited from class it.geosolutions.jaiext.scale.ScaleOpImage
backwardMapRect, computeTile, dispose, forwardMapRect, mapDestPoint, mapSourcePoint, preComputePositionsFloat, preComputePositionsInt
 
Methods inherited from class javax.media.jai.GeometricOpImage
getBorderExtender, getInterpolation, mapDestRect, mapSourceRect
 
Methods inherited from class javax.media.jai.OpImage
addTileToCache, cancelTiles, computeRect, computesUniqueTiles, createTile, getExpandedNumBands, getFormatTags, getOperationComputeType, getTile, getTileCache, getTileCacheMetric, getTileDependencies, getTileFromCache, getTileRecycler, getTiles, hasExtender, prefetchTiles, queueTiles, recycleTile, setTileCache, vectorize, vectorize, vectorize
 
Methods inherited from class javax.media.jai.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, getSources, 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 java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

interpN

protected InterpolationNearest interpN
Nearest-Neighbor interpolator

Constructor Detail

ScaleNearestOpImage2

public ScaleNearestOpImage2(RenderedImage source,
                            javax.media.jai.ImageLayout layout,
                            Map configuration,
                            javax.media.jai.BorderExtender extender,
                            javax.media.jai.Interpolation interp,
                            float scaleX,
                            float scaleY,
                            float transX,
                            float transY,
                            boolean useRoiAccessor)
Method Detail

computeRect

protected void computeRect(Raster[] sources,
                           WritableRaster dest,
                           Rectangle destRect,
                           Raster[] rois)
Specified by:
computeRect in class ScaleOpImage

computeRect

protected void computeRect(Raster[] sources,
                           WritableRaster dest,
                           Rectangle destRect)
Overrides:
computeRect in class javax.media.jai.OpImage


Copyright © 2006–2014 GeoSolutions. All rights reserved.