Class ImagePlusReader

java.lang.Object
loci.plugins.in.ImagePlusReader
All Implemented Interfaces:
loci.common.StatusReporter

public class ImagePlusReader extends Object implements loci.common.StatusReporter
A high-level reader for ImagePlus objects.
  • Field Details

    • PROP_SERIES

      public static final String PROP_SERIES
      Special property for storing series number associated with the image.
      See Also:
    • PROP_LUT

      public static final String PROP_LUT
      Special property prefix for storing planar LUTs.
      See Also:
    • process

      protected ImportProcess process
      Import preparation process managing Bio-Formats readers and other state.
    • listeners

      protected List<loci.common.StatusListener> listeners
    • startTime

      private long startTime
    • time

      private long time
  • Constructor Details

    • ImagePlusReader

      public ImagePlusReader() throws IOException
      Constructs an ImagePlusReader with the default options.
      Throws:
      IOException - if the default options cannot be determined.
    • ImagePlusReader

      public ImagePlusReader(ImportProcess process)
      Constructs an ImagePlusReader with the given complete import preparation process.
  • Method Details

    • openImagePlus

      public ij.ImagePlus[] openImagePlus() throws FormatException, IOException
      Opens one or more ImagePlus objects corresponding to the reader's associated options.
      Throws:
      FormatException
      IOException
    • openThumbImagePlus

      public ij.ImagePlus[] openThumbImagePlus() throws FormatException, IOException
      Throws:
      FormatException
      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(String title, 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(String title, ij.ImageStack stack, 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(List<ij.process.ImageProcessor> procs, List<String> labels, 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 String[] getSubCTypes(Modulo moduloC)
    • readImages

      private List<ij.ImagePlus> readImages() throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • readThumbImages

      private List<ij.ImagePlus> readThumbImages() throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • readImages

      private List<ij.ImagePlus> readImages(boolean thumbnail) throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • readImage

      private ij.ImagePlus readImage(int s, boolean thumbnail) throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • createVirtualStack

      private ij.ImageStack createVirtualStack(ImportProcess process, int s, List<ij.process.LUT> luts) throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • readPlanes

      private ij.ImageStack readPlanes(ImportProcess process, int s, List<ij.process.LUT> luts, boolean thumbnail) throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • concatenate

      private List<ij.ImagePlus> concatenate(List<ij.ImagePlus> imps)
    • applyColors

      private List<ij.ImagePlus> applyColors(List<ij.ImagePlus> imps)
    • splitDims

      private List<ij.ImagePlus> splitDims(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 String constructImageTitle(IFormatReader r, String file, String seriesName, boolean groupFiles)
    • constructSliceLabel

      private String constructSliceLabel(int ndx, IFormatReader r, IMetadata meta, int series, int zCount, int cCount, int tCount)
    • substringsBetween

      private static String[] substringsBetween(String str, String open, String close)
    • saveLUTs

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