loci.plugins.util

## Class ImageProcessorReader

- java.lang.Object
- - loci.formats.ReaderWrapper
  - - loci.plugins.util.ImageProcessorReader

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ICompressedTileReader, IFormatHandler, IFormatReader, IMetadataConfigurable, IPyramidHandler

      public class ImageProcessorReader
      extends ReaderWrapper

  A low-level reader for `ImageProcessor` objects. For a higher-level reader that returns `ImagePlus` objects, see `ImagePlusReader` instead.

- - ### Field Summary

    - ### Fields inherited from class loci.formats.ReaderWrapper

      `reader`

    - ### Fields inherited from interface loci.formats.IFormatReader

      `CAN_GROUP, CANNOT_GROUP, MUST_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImageProcessorReader()` Constructs an ImageProcessorReader around a new image reader.
    `ImageProcessorReader(IFormatReader r)` Constructs an ImageProcessorReader with the given reader.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private byte[][]` | `convertTo8Bit(short[][] shortTable)`
    `private ij.process.LUT` | `createColorModel()`
    `java.lang.Class<?>` | `getNativeDataType()` Returns the native data type of image planes for this reader, as returned by `IFormatReader.openPlane(int, int, int, int, int)` or `IFormatWriter.savePlane(int, java.lang.Object)`.
    `static ImageProcessorReader` | `makeImageProcessorReader(IFormatReader r)` Converts the given reader into a ImageProcessorReader, wrapping if needed.
    `java.lang.Object` | `openPlane(int no, int x, int y, int w, int h)` Obtains the specified image plane (or sub-image thereof) in the reader's native data structure.
    `ij.process.ImageProcessor[]` | `openProcessors(int no)` Creates an ImageJ image processor object for the image plane at the given position.
    `ij.process.ImageProcessor[]` | `openProcessors(int no, int x, int y, int w, int h)` Returns an array of ImageProcessors that represent the given slice.
    `ij.process.ImageProcessor[]` | `openThumbProcessors(int no)`

    - ### Methods inherited from class loci.formats.ReaderWrapper

      `close, close, coreIndexToSeries, duplicate, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getBitsPerPixel, getCoreIndex, getCoreMetadataList, getCurrentFile, getDatasetStructureDescription, getDimensionOrder, getDomains, getEffectiveSizeC, getFillColor, getFormat, getGlobalMetadata, getImageCount, getIndex, getIndex, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getTileCodec, getTileCodecOptions, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openBytes, openBytes, openBytes, openBytes, openCompressedBytes, openCompressedBytes, openThumbBytes, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrap`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ImageProcessorReader

          public ImageProcessorReader()

      Constructs an ImageProcessorReader around a new image reader.

    - #### ImageProcessorReader

          public ImageProcessorReader(IFormatReader r)

      Constructs an ImageProcessorReader with the given reader.

  - ### Method Detail

    - #### makeImageProcessorReader

          public static ImageProcessorReader makeImageProcessorReader(IFormatReader r)

      Converts the given reader into a ImageProcessorReader, wrapping if needed.

    - #### openProcessors

          public ij.process.ImageProcessor[] openProcessors(int no)
                                                     throws FormatException,
                                                            java.io.IOException

      Creates an ImageJ image processor object for the image plane at the given position.
      Parameters:
        `no` - Position of image plane.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### openThumbProcessors

          public ij.process.ImageProcessor[] openThumbProcessors(int no)
                                                          throws FormatException,
                                                                 java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### openProcessors

          public ij.process.ImageProcessor[] openProcessors(int no,
                                                            int x,
                                                            int y,
                                                            int w,
                                                            int h)
                                                     throws FormatException,
                                                            java.io.IOException

      Returns an array of ImageProcessors that represent the given slice. There is one ImageProcessor per RGB channel; i.e., length of returned array == getRGBChannelCount().
      Parameters:
        `no` - Position of image plane.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### getNativeDataType

          public java.lang.Class<?> getNativeDataType()

      Description copied from interface: `IFormatHandler`
      Returns the native data type of image planes for this reader, as returned by `IFormatReader.openPlane(int, int, int, int, int)` or `IFormatWriter.savePlane(int, java.lang.Object)`. For most readers this type will be a byte array; however, some readers call external APIs that work with other types such as `BufferedImage`.
      Specified by:
        `getNativeDataType` in interface `IFormatHandler`
      Overrides:
        `getNativeDataType` in class `ReaderWrapper`

    - #### openPlane

          public java.lang.Object openPlane(int no,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
                                     throws FormatException,
                                            java.io.IOException

      Description copied from interface: `IFormatReader`
      Obtains the specified image plane (or sub-image thereof) in the reader's native data structure. For most readers this is a byte array; however, some readers call external APIs that work with other types such as `BufferedImage`. The openPlane method exists to maintain generality and efficiency while avoiding pollution of the API with AWT-specific logic.
      Specified by:
        `openPlane` in interface `IFormatReader`
      Overrides:
        `openPlane` in class `ReaderWrapper`
      Throws:
        `FormatException`
        `java.io.IOException`
      See Also:
        `FormatReader`, `BufferedImageReader`

    - #### createColorModel

          private ij.process.LUT createColorModel()
                                           throws FormatException,
                                                  java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### convertTo8Bit

          private byte[][] convertTo8Bit(short[][] shortTable)

Copyright © 2026 Open Microscopy Environment