Package loci.plugins.in
Class ImagePlusReader
java.lang.Object
loci.plugins.in.ImagePlusReader
- All Implemented Interfaces:
loci.common.StatusReporter
A high-level reader for
ImagePlus objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<loci.common.StatusListener> protected ImportProcessImport preparation process managing Bio-Formats readers and other state.static final StringSpecial property prefix for storing planar LUTs.static final StringSpecial property for storing series number associated with the image.private longprivate long -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an ImagePlusReader with the default options.ImagePlusReader(ImportProcess process) Constructs an ImagePlusReader with the given complete import preparation process. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusListener(loci.common.StatusListener l) private List<ij.ImagePlus> applyColors(List<ij.ImagePlus> imps) private List<ij.ImagePlus> concatenate(List<ij.ImagePlus> imps) private StringconstructImageTitle(IFormatReader r, String file, String seriesName, boolean groupFiles) private StringconstructSliceLabel(int ndx, IFormatReader r, IMetadata meta, int series, int zCount, int cCount, int tCount) private ij.io.FileInfostatic ij.ImagePluscreateImage(String title, ij.ImageStack stack, List<ij.process.LUT> luts) Creates anImagePlusfrom the given image stack.static ij.ImagePluscreateImage(String title, List<ij.process.ImageProcessor> procs) Creates anImagePlusfrom the given image processors.static ij.ImageStackcreateStack(List<ij.process.ImageProcessor> procs, List<String> labels, List<ij.process.LUT> luts) Creates an image stack from the given image processors.private ij.ImageStackcreateVirtualStack(ImportProcess process, int s, List<ij.process.LUT> luts) private voidprivate boolean[]getPlanesToLoad(int s) static int[]static String[]getSubCTypes(Modulo moduloC) voidnotifyListeners(loci.common.StatusEvent e) ij.ImagePlus[]Opens one or moreImagePlusobjects corresponding to the reader's associated options.ij.ImagePlus[]private ij.ImagePlusreadImage(int s, boolean thumbnail) private List<ij.ImagePlus> private List<ij.ImagePlus> readImages(boolean thumbnail) private ij.ImageStackreadPlanes(ImportProcess process, int s, List<ij.process.LUT> luts, boolean thumbnail) private List<ij.ImagePlus> voidremoveStatusListener(loci.common.StatusListener l) private static voidprivate List<ij.ImagePlus> private voidprivate static String[]substringsBetween(String str, String open, String close) private voidupdateTiming(int s, int i, int current, int total)
-
Field Details
-
PROP_SERIES
Special property for storing series number associated with the image.- See Also:
-
PROP_LUT
Special property prefix for storing planar LUTs.- See Also:
-
process
Import preparation process managing Bio-Formats readers and other state. -
listeners
-
startTime
private long startTime -
time
private long time
-
-
Constructor Details
-
ImagePlusReader
Constructs an ImagePlusReader with the default options.- Throws:
IOException- if the default options cannot be determined.
-
ImagePlusReader
Constructs an ImagePlusReader with the given complete import preparation process.
-
-
Method Details
-
openImagePlus
Opens one or moreImagePlusobjects corresponding to the reader's associated options.- Throws:
FormatExceptionIOException
-
openThumbImagePlus
- Throws:
FormatExceptionIOException
-
addStatusListener
public void addStatusListener(loci.common.StatusListener l) - Specified by:
addStatusListenerin interfaceloci.common.StatusReporter
-
removeStatusListener
public void removeStatusListener(loci.common.StatusListener l) - Specified by:
removeStatusListenerin interfaceloci.common.StatusReporter
-
notifyListeners
public void notifyListeners(loci.common.StatusEvent e) - Specified by:
notifyListenersin interfaceloci.common.StatusReporter
-
createImage
Creates anImagePlusfrom 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 anImagePlusfrom 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
-
getSubCTypes
-
readImages
- Throws:
FormatExceptionIOException
-
readThumbImages
- Throws:
FormatExceptionIOException
-
readImages
- Throws:
FormatExceptionIOException
-
readImage
- Throws:
FormatExceptionIOException
-
createVirtualStack
private ij.ImageStack createVirtualStack(ImportProcess process, int s, List<ij.process.LUT> luts) throws FormatException, IOException - Throws:
FormatExceptionIOException
-
readPlanes
private ij.ImageStack readPlanes(ImportProcess process, int s, List<ij.process.LUT> luts, boolean thumbnail) throws FormatException, IOException - Throws:
FormatExceptionIOException
-
concatenate
-
applyColors
-
splitDims
-
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
-
saveLUTs
-