loci.plugins.in

## Class ImagePlusReader

- java.lang.Object
- - loci.plugins.in.ImagePlusReader

- All Implemented Interfaces:
    loci.common.StatusReporter

      public class ImagePlusReader
      extends java.lang.Object
      implements loci.common.StatusReporter

  A high-level reader for `ImagePlus` objects.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<loci.common.StatusListener>` | `listeners`
    `protected ImportProcess` | `process` Import preparation process managing Bio-Formats readers and other state.
    `static java.lang.String` | `PROP_LUT` Special property prefix for storing planar LUTs.
    `static java.lang.String` | `PROP_SERIES` Special property for storing series number associated with the image.
    `private long` | `startTime`
    `private long` | `time`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImagePlusReader()` Constructs an ImagePlusReader with the default options.
    `ImagePlusReader(ImportProcess process)` Constructs an ImagePlusReader with the given complete import preparation process.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStatusListener(loci.common.StatusListener l)`
    `private java.util.List<ij.ImagePlus>` | `applyColors(java.util.List<ij.ImagePlus> imps)`
    `private java.util.List<ij.ImagePlus>` | `concatenate(java.util.List<ij.ImagePlus> imps)`
    `private java.lang.String` | `constructImageTitle(IFormatReader r, java.lang.String file, java.lang.String seriesName, boolean groupFiles)`
    `private java.lang.String` | `constructSliceLabel(int ndx, IFormatReader r, IMetadata meta, int series, int zCount, int cCount, int tCount)`
    `private ij.io.FileInfo` | `createFileInfo()`
    `static ij.ImagePlus` | `createImage(java.lang.String title, ij.ImageStack stack, java.util.List<ij.process.LUT> luts)` Creates an `ImagePlus` from the given image stack.
    `static ij.ImagePlus` | `createImage(java.lang.String title, java.util.List<ij.process.ImageProcessor> procs)` Creates an `ImagePlus` from the given image processors.
    `static ij.ImageStack` | `createStack(java.util.List<ij.process.ImageProcessor> procs, java.util.List<java.lang.String> labels, java.util.List<ij.process.LUT> luts)` Creates an image stack from the given image processors.
    `private ij.ImageStack` | `createVirtualStack(ImportProcess process, int s, java.util.List<ij.process.LUT> luts)`
    `private void` | `finishTiming()`
    `private boolean[]` | `getPlanesToLoad(int s)`
    `static int[]` | `getSubC(Modulo moduloC, int sizeC)`
    `static java.lang.String[]` | `getSubCTypes(Modulo moduloC)`
    `void` | `notifyListeners(loci.common.StatusEvent e)`
    `ij.ImagePlus[]` | `openImagePlus()` Opens one or more `ImagePlus` objects corresponding to the reader's associated options.
    `ij.ImagePlus[]` | `openThumbImagePlus()`
    `private ij.ImagePlus` | `readImage(int s, boolean thumbnail)`
    `private java.util.List<ij.ImagePlus>` | `readImages()`
    `private java.util.List<ij.ImagePlus>` | `readImages(boolean thumbnail)`
    `private ij.ImageStack` | `readPlanes(ImportProcess process, int s, java.util.List<ij.process.LUT> luts, boolean thumbnail)`
    `private java.util.List<ij.ImagePlus>` | `readThumbImages()`
    `void` | `removeStatusListener(loci.common.StatusListener l)`
    `private static void` | `saveLUTs(ij.ImagePlus imp, java.util.List<ij.process.LUT> luts)`
    `private java.util.List<ij.ImagePlus>` | `splitDims(java.util.List<ij.ImagePlus> imps)`
    `private void` | `startTiming()`
    `private static java.lang.String[]` | `substringsBetween(java.lang.String str, java.lang.String open, java.lang.String close)`
    `private void` | `updateTiming(int s, int i, int current, int total)`

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

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

- - ### Field Detail

    - #### PROP_SERIES

          public static final java.lang.String PROP_SERIES

      Special property for storing series number associated with the image.
      See Also:
        Constant Field Values

    - #### PROP_LUT

          public static final java.lang.String PROP_LUT

      Special property prefix for storing planar LUTs.
      See Also:
        Constant Field Values

    - #### process

          protected ImportProcess process

      Import preparation process managing Bio-Formats readers and other state.

    - #### listeners

          protected java.util.List<loci.common.StatusListener> listeners

    - #### startTime

          private long startTime

    - #### time

          private long time

  - ### Constructor Detail

    - #### ImagePlusReader

          public ImagePlusReader()
                          throws java.io.IOException

      Constructs an ImagePlusReader with the default options.
      Throws:
        `java.io.IOException` - if the default options cannot be determined.

    - #### ImagePlusReader

          public ImagePlusReader(ImportProcess process)

      Constructs an ImagePlusReader with the given complete import preparation process.

  - ### Method Detail

    - #### openImagePlus

          public ij.ImagePlus[] openImagePlus()
                                       throws FormatException,
                                              java.io.IOException

      Opens one or more `ImagePlus` objects corresponding to the reader's associated options.
      Throws:
        `FormatException`
        `java.io.IOException`

    - #### openThumbImagePlus

          public ij.ImagePlus[] openThumbImagePlus()
                                            throws FormatException,
                                                   java.io.IOException

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

    - #### addStatusListener

          public void addStatusListener(loci.common.StatusListener l)

      Specified by:
        `addStatusListener` in interface `loci.common.StatusReporter`

    - #### removeStatusListener

          public void removeStatusListener(loci.common.StatusListener l)

      Specified by:
        `removeStatusListener` in interface `loci.common.StatusReporter`

    - #### notifyListeners

          public void notifyListeners(loci.common.StatusEvent e)

      Specified by:
        `notifyListeners` in interface `loci.common.StatusReporter`

    - #### createImage

          public static ij.ImagePlus createImage(java.lang.String title,
                                                 java.util.List<ij.process.ImageProcessor> procs)

      Creates an `ImagePlus` from the given image processors.
      Parameters:
        `title` - The title for the image.
        `procs` - List of image processors to compile into an image.

    - #### createImage

          public static ij.ImagePlus createImage(java.lang.String title,
                                                 ij.ImageStack stack,
                                                 java.util.List<ij.process.LUT> luts)

      Creates an `ImagePlus` from the given image stack.
      Parameters:
        `title` - The title for the image.
        `stack` - The image stack containing the image planes.
        `luts` - Optional list of plane-specific LUTs to store as image properties, for later use.

    - #### createStack

          public static ij.ImageStack createStack(java.util.List<ij.process.ImageProcessor> procs,
                                                  java.util.List<java.lang.String> labels,
                                                  java.util.List<ij.process.LUT> luts)

      Creates an image stack from the given image processors.
      Parameters:
        `procs` - List of image processors to compile into a stack.
        `labels` - Optional list of labels, one per plane.
        `luts` - Optional list for storing plane-specific LUTs, for later use.

    - #### getSubC

          public static int[] getSubC(Modulo moduloC,
                                      int sizeC)

    - #### getSubCTypes

          public static java.lang.String[] getSubCTypes(Modulo moduloC)

    - #### readImages

          private java.util.List<ij.ImagePlus> readImages()
                                                   throws FormatException,
                                                          java.io.IOException

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

    - #### readThumbImages

          private java.util.List<ij.ImagePlus> readThumbImages()
                                                        throws FormatException,
                                                               java.io.IOException

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

    - #### readImages

          private java.util.List<ij.ImagePlus> readImages(boolean thumbnail)
                                                   throws FormatException,
                                                          java.io.IOException

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

    - #### readImage

          private ij.ImagePlus readImage(int s,
                                         boolean thumbnail)
                                  throws FormatException,
                                         java.io.IOException

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

    - #### createVirtualStack

          private ij.ImageStack createVirtualStack(ImportProcess process,
                                                   int s,
                                                   java.util.List<ij.process.LUT> luts)
                                            throws FormatException,
                                                   java.io.IOException

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

    - #### readPlanes

          private ij.ImageStack readPlanes(ImportProcess process,
                                           int s,
                                           java.util.List<ij.process.LUT> luts,
                                           boolean thumbnail)
                                    throws FormatException,
                                           java.io.IOException

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

    - #### concatenate

          private java.util.List<ij.ImagePlus> concatenate(java.util.List<ij.ImagePlus> imps)

    - #### applyColors

          private java.util.List<ij.ImagePlus> applyColors(java.util.List<ij.ImagePlus> imps)

    - #### splitDims

          private java.util.List<ij.ImagePlus> splitDims(java.util.List<ij.ImagePlus> imps)

    - #### startTiming

          private void startTiming()

    - #### updateTiming

          private void updateTiming(int s,
                                    int i,
                                    int current,
                                    int total)

    - #### finishTiming

          private void finishTiming()

    - #### createFileInfo

          private ij.io.FileInfo createFileInfo()

    - #### getPlanesToLoad

          private boolean[] getPlanesToLoad(int s)

    - #### constructImageTitle

          private java.lang.String constructImageTitle(IFormatReader r,
                                                       java.lang.String file,
                                                       java.lang.String seriesName,
                                                       boolean groupFiles)

    - #### constructSliceLabel

          private java.lang.String constructSliceLabel(int ndx,
                                                       IFormatReader r,
                                                       IMetadata meta,
                                                       int series,
                                                       int zCount,
                                                       int cCount,
                                                       int tCount)

    - #### substringsBetween

          private static java.lang.String[] substringsBetween(java.lang.String str,
                                                              java.lang.String open,
                                                              java.lang.String close)

    - #### saveLUTs

          private static void saveLUTs(ij.ImagePlus imp,
                                       java.util.List<ij.process.LUT> luts)

Copyright © 2026 Open Microscopy Environment