Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ij.io
Class ImageReader

    java.lang.Object
      ij.io.ImageReader

public class ImageReader
extends java.lang.Object

Reads raw 8-bit, 16-bit or 32-bit (float or RGB) images from a stream or URL.

Constructor Summary
`ImageReader(FileInfo fi)` Constructs a new ImageReader using a FileInfo object to describe the file to be read.

Method Summary
`byte[]` | `lzwUncompress(byte[] input)` Utility method for decoding an LZW-compressed image strip.
`java.lang.Object` | `readPixels(java.io.InputStream in)` Reads the image from the InputStream and returns the pixel array (byte, short, int or float).
`java.lang.Object` | `readPixels(java.io.InputStream in, long skipCount)` Skips the specified number of bytes, then reads an image and returns the pixel array (byte, short, int or float).
`java.lang.Object` | `readPixels(java.lang.String url)` Reads the image from a URL and returns the pixel array (byte, short, int or float).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ImageReader

    public ImageReader(FileInfo fi)

  Constructs a new ImageReader using a FileInfo object to describe the file to be read.

See Also:
  `FileInfo`

Method Detail

### readPixels

    public java.lang.Object readPixels(java.io.InputStream in)

  Reads the image from the InputStream and returns the pixel array (byte, short, int or float). Returns null if there was an IO exception. Does not close the InputStream.

### readPixels

    public java.lang.Object readPixels(java.io.InputStream in,
                                       long skipCount)

  Skips the specified number of bytes, then reads an image and returns the pixel array (byte, short, int or float). Returns null if there was an IO exception. Does not close the InputStream.

### readPixels

    public java.lang.Object readPixels(java.lang.String url)

  Reads the image from a URL and returns the pixel array (byte, short, int or float). Returns null if there was an IO exception.

### lzwUncompress

    public byte[] lzwUncompress(byte[] input)

  Utility method for decoding an LZW-compressed image strip. Adapted from the TIFF 6.0 Specification: http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf (page 61)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD