it.tidalwave.imageio.crw
Class CRWRasterReader

java.lang.Object
  extended by it.tidalwave.imageio.raw.RasterReader
      extended by it.tidalwave.imageio.crw.CRWRasterReader

public class CRWRasterReader
extends RasterReader

This class loads raster data for Canon cameras. Thanks to Dave Coffin for providing through his dcraw information about the compression scheme.

Version:
CVS $Id: CRWRasterReader.java,v 1.2 2006/02/08 19:49:01 fabriziogiudici Exp $
Author:
Fabrizio Giudici

Field Summary
 
Fields inherited from class it.tidalwave.imageio.raw.RasterReader
B_OFFSET, bitsPerSample, cfaOffsets, compression, G_OFFSET, linearizationTable, R_OFFSET, stripByteCount, tileHeight, tileOffsets, tilesAcross, tilesDown, tileWidth
 
Constructor Summary
CRWRasterReader()
           
 
Method Summary
static CRWRasterReader getInstance(java.lang.String model)
          Returns the most appropriate RasterReader for the given Canon model.
protected  boolean isCompressedRaster()
          This method returns true if a compressed raster is supported.
protected  void loadCompressedRaster(RAWImageInputStream iis, java.awt.image.WritableRaster raster, RAWImageReaderSupport ir)
          Reads a compressed raster.
 void setDecoderPairIndex(int decoderPairIndex)
           
 void setRasterOffset(int rasterOffset)
           
 
Methods inherited from class it.tidalwave.imageio.raw.RasterReader
createRaster, getRow, getSkipCountAtColumn, getSkipCountAtEndOfRow, loadRaster, loadUncompressedRaster, selectBitReader, setBitsPerSample, setCFAPattern, setCompression, setHeight, setLinearizationTable, setRasterOffset, setStripByteCount, setTileHeight, setTileOffsets, setTilesAcross, setTilesDown, setTileWidth, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRWRasterReader

public CRWRasterReader()
Method Detail

setRasterOffset

public void setRasterOffset(int rasterOffset)
Parameters:
rasterOffset -

setDecoderPairIndex

public void setDecoderPairIndex(int decoderPairIndex)
Parameters:
decoderPairIndex -

getInstance

public static CRWRasterReader getInstance(java.lang.String model)
Returns the most appropriate RasterReader for the given Canon model.

Parameters:
model - the camera model
Returns:
the RasterReader

isCompressedRaster

protected boolean isCompressedRaster()
Description copied from class: RasterReader
This method returns true if a compressed raster is supported. It returns false by default: subclasses should implement a test and return the most appropriate value.

Overrides:
isCompressedRaster in class RasterReader
Returns:
true if a compressed raster is supported

loadCompressedRaster

protected void loadCompressedRaster(RAWImageInputStream iis,
                                    java.awt.image.WritableRaster raster,
                                    RAWImageReaderSupport ir)
                             throws java.io.IOException
Description copied from class: RasterReader
Reads a compressed raster. This method is empty and specific subclasses for various RAW formats should override it, if a compressed raster is available.

Overrides:
loadCompressedRaster in class RasterReader
Parameters:
iis - the image input stream
raster - the raster to read data into
ir - the image reader
Throws:
java.io.IOException - if an I/O error occurs