Class RawRenderedImage
- java.lang.Object
-
- com.github.jaiimageio.impl.common.SimpleRenderedImage
-
- com.github.jaiimageio.impl.plugins.raw.RawRenderedImage
-
- All Implemented Interfaces:
java.awt.image.RenderedImage
public class RawRenderedImage extends SimpleRenderedImage
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.image.RastercurrentTileprivate java.awt.PointcurrentTileGridprivate java.awt.image.BufferedImagedestImageprivate int[]destinationBandsprivate java.awt.RectangledestinationRegionThe destination bounds.private RawImageInputStreamiisThe input stream we read fromprivate intimageIndexprivate intmaxXTileprivate intmaxYTileprivate intnCompprivate booleannoTransformCoordinate transform is not needed from the source (image stream) to the destination.private java.awt.DimensionoriginalDimensionprivate intoriginalNumXTilesThe orginal number tiles in X direction.private java.awt.RectangleoriginalRegionprivate java.awt.image.SampleModeloriginalSampleModelThe sample model for the original image.private javax.imageio.ImageReadParamparamTheImageReadParamto create thisrenderedImage.private longpositionThe position of the first sample of this image in the stream.private java.awt.image.WritableRasterrasForATileThe raster for medialib tiles to share.private RawImageReaderreaderCaches theRawImageReaderwhich creates this object.private intscaleXThe subsampling parameters.private intscaleYThe subsampling parameters.private int[]sourceBandsprivate java.awt.PointsourceOriginprivate longtileDataSizecache the size of the data for each tile in the stream.private intxOffsetThe subsampling parameters.private intyOffsetThe subsampling parameters.-
Fields inherited from class com.github.jaiimageio.impl.common.SimpleRenderedImage
colorModel, height, minX, minY, properties, sampleModel, sources, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width
-
-
Constructor Summary
Constructors Constructor Description RawRenderedImage(RawImageInputStream iis, RawImageReader reader, javax.imageio.ImageReadParam param, int imageIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearDestImage()private intclip(int value, int min, int max)java.awt.image.RastergetTile(int tileX, int tileY)private intgetTileNum(int x, int y)voidreadAsRaster(java.awt.image.WritableRaster raster)private java.awt.image.RasterreadSubsampledRaster(java.awt.image.WritableRaster raster)voidsetDestImage(java.awt.image.BufferedImage image)-
Methods inherited from class com.github.jaiimageio.impl.common.SimpleRenderedImage
copyData, getBounds, getColorModel, getData, getData, getHeight, getMaxTileX, getMaxTileY, getMaxX, getMaxY, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getPropertyNames, getSampleModel, getSources, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, tileXToX, tileXToX, tileYToY, tileYToY, XToTileX, XToTileX, YToTileY, YToTileY
-
-
-
-
Field Detail
-
originalSampleModel
private java.awt.image.SampleModel originalSampleModel
The sample model for the original image.
-
currentTile
private java.awt.image.Raster currentTile
-
currentTileGrid
private java.awt.Point currentTileGrid
-
iis
private RawImageInputStream iis
The input stream we read from
-
reader
private RawImageReader reader
Caches theRawImageReaderwhich creates this object. This variable is used to monitor the abortion.
-
param
private javax.imageio.ImageReadParam param
TheImageReadParamto create thisrenderedImage.
-
imageIndex
private int imageIndex
-
destinationRegion
private java.awt.Rectangle destinationRegion
The destination bounds.
-
originalRegion
private java.awt.Rectangle originalRegion
-
sourceOrigin
private java.awt.Point sourceOrigin
-
originalDimension
private java.awt.Dimension originalDimension
-
maxXTile
private int maxXTile
-
maxYTile
private int maxYTile
-
scaleX
private int scaleX
The subsampling parameters.
-
scaleY
private int scaleY
The subsampling parameters.
-
xOffset
private int xOffset
The subsampling parameters.
-
yOffset
private int yOffset
The subsampling parameters.
-
destinationBands
private int[] destinationBands
-
sourceBands
private int[] sourceBands
-
nComp
private int nComp
-
noTransform
private boolean noTransform
Coordinate transform is not needed from the source (image stream) to the destination.
-
rasForATile
private java.awt.image.WritableRaster rasForATile
The raster for medialib tiles to share.
-
destImage
private java.awt.image.BufferedImage destImage
-
position
private long position
The position of the first sample of this image in the stream.
-
tileDataSize
private long tileDataSize
cache the size of the data for each tile in the stream.
-
originalNumXTiles
private int originalNumXTiles
The orginal number tiles in X direction.
-
-
Constructor Detail
-
RawRenderedImage
public RawRenderedImage(RawImageInputStream iis, RawImageReader reader, javax.imageio.ImageReadParam param, int imageIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getTile
public java.awt.image.Raster getTile(int tileX, int tileY)
-
readAsRaster
public void readAsRaster(java.awt.image.WritableRaster raster) throws java.io.IOException- Throws:
java.io.IOException
-
readSubsampledRaster
private java.awt.image.Raster readSubsampledRaster(java.awt.image.WritableRaster raster) throws java.io.IOException- Throws:
java.io.IOException
-
setDestImage
public void setDestImage(java.awt.image.BufferedImage image)
-
clearDestImage
public void clearDestImage()
-
getTileNum
private int getTileNum(int x, int y)
-
clip
private int clip(int value, int min, int max)
-
-