it.tidalwave.imageio.nef
Class NEFRasterReader

java.lang.Object
  extended by it.tidalwave.imageio.raw.RasterReader
      extended by it.tidalwave.imageio.nef.NEFRasterReader
Direct Known Subclasses:
NDFRasterReader, RasterReader_NIKON_D100, RasterReaderCoolpix

public class NEFRasterReader
extends RasterReader

This class implements the compressed NEF raster loading.

Version:
CVS $Id: NEFRasterReader.java,v 1.3 2006/02/08 20:08:45 fabriziogiudici Exp $
Author:
Fabrizio Giudici

Field Summary
protected static int COMPRESSED_NEF
          This value in the 'Compressed' TIFF tag stands for the proprietary Nikon compression scheme.
 
Fields inherited from class it.tidalwave.imageio.raw.RasterReader
B_OFFSET, bitsPerSample, cfaOffsets, compression, G_OFFSET, linearizationTable, R_OFFSET, rasterOffset, stripByteCount, tileHeight, tileOffsets, tilesAcross, tilesDown, tileWidth
 
Constructor Summary
NEFRasterReader()
           
 
Method Summary
static NEFRasterReader getInstance(java.lang.String model, boolean isNDF)
          Returns the most appropriate RasterReader for the given Nikon 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 setVPredictor(int[] vPredictor)
          Sets the vertical predictor values.
 
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
 

Field Detail

COMPRESSED_NEF

protected static final int COMPRESSED_NEF
This value in the 'Compressed' TIFF tag stands for the proprietary Nikon compression scheme.

See Also:
Constant Field Values
Constructor Detail

NEFRasterReader

public NEFRasterReader()
Method Detail

getInstance

public static NEFRasterReader getInstance(java.lang.String model,
                                          boolean isNDF)
Returns the most appropriate RasterReader for the given Nikon model. A generic RasterReader is used for most models; RasterReader_NIKON_D100 is used for the Nikon D100 model; NDFRasterReader is used for dust sample files.

Parameters:
model - the camera model
isNDF - true if it's a dust sample
Returns:
the RasterReader

setVPredictor

public void setVPredictor(int[] vPredictor)
Sets the vertical predictor values.

Parameters:
vPredictor - the vertical predictor values

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