public class ImagePlusReader
extends java.lang.Object
implements loci.common.StatusReporter
ImagePlus
objects.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 and Description |
---|
ImagePlusReader()
Constructs an ImagePlusReader with the default options.
|
ImagePlusReader(ImportProcess process)
Constructs an ImagePlusReader with the
given complete import preparation process.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(loci.common.StatusListener l) |
private java.util.List<ImagePlus> |
applyColors(java.util.List<ImagePlus> imps) |
private java.util.List<ImagePlus> |
concatenate(java.util.List<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 FileInfo |
createFileInfo() |
static ImagePlus |
createImage(java.lang.String title,
ImageStack stack,
java.util.List<LUT> luts)
Creates an
ImagePlus from the given image stack. |
static ImagePlus |
createImage(java.lang.String title,
java.util.List<ImageProcessor> procs)
Creates an
ImagePlus from the given image processors. |
static ImageStack |
createStack(java.util.List<ImageProcessor> procs,
java.util.List<java.lang.String> labels,
java.util.List<LUT> luts)
Creates an image stack from the given image processors.
|
private ImageStack |
createVirtualStack(ImportProcess process,
int s,
java.util.List<LUT> luts) |
private void |
finishTiming() |
private boolean[] |
getPlanesToLoad(int s) |
void |
notifyListeners(loci.common.StatusEvent e) |
ImagePlus[] |
openImagePlus()
Opens one or more
ImagePlus objects
corresponding to the reader's associated options. |
ImagePlus[] |
openThumbImagePlus() |
private ImagePlus |
readImage(int s,
boolean thumbnail) |
private java.util.List<ImagePlus> |
readImages() |
private java.util.List<ImagePlus> |
readImages(boolean thumbnail) |
private ImageStack |
readPlanes(ImportProcess process,
int s,
java.util.List<LUT> luts,
boolean thumbnail) |
private ImageProcessor[] |
readProcessors(ImportProcess process,
int no,
loci.common.Region r,
boolean thumbnail)
HACK: This method mainly exists to prompt the user for a missing
LuraWave license code, in the case of LWF-compressed Flex.
|
private java.util.List<ImagePlus> |
readThumbImages() |
void |
removeStatusListener(loci.common.StatusListener l) |
private static void |
saveLUTs(ImagePlus imp,
java.util.List<LUT> luts) |
private java.util.List<ImagePlus> |
splitDims(java.util.List<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) |
public static final java.lang.String PROP_SERIES
public static final java.lang.String PROP_LUT
protected ImportProcess process
protected java.util.List<loci.common.StatusListener> listeners
private long startTime
private long time
public ImagePlusReader() throws java.io.IOException
java.io.IOException
- if the default options cannot be determined.public ImagePlusReader(ImportProcess process)
public ImagePlus[] openImagePlus() throws FormatException, java.io.IOException
ImagePlus
objects
corresponding to the reader's associated options.FormatException
java.io.IOException
public ImagePlus[] openThumbImagePlus() throws FormatException, java.io.IOException
FormatException
java.io.IOException
public void addStatusListener(loci.common.StatusListener l)
addStatusListener
in interface loci.common.StatusReporter
public void removeStatusListener(loci.common.StatusListener l)
removeStatusListener
in interface loci.common.StatusReporter
public void notifyListeners(loci.common.StatusEvent e)
notifyListeners
in interface loci.common.StatusReporter
public static ImagePlus createImage(java.lang.String title, java.util.List<ImageProcessor> procs)
ImagePlus
from the given image processors.title
- The title for the image.procs
- List of image processors to compile into an image.public static ImagePlus createImage(java.lang.String title, ImageStack stack, java.util.List<LUT> luts)
ImagePlus
from the given image stack.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.public static ImageStack createStack(java.util.List<ImageProcessor> procs, java.util.List<java.lang.String> labels, java.util.List<LUT> luts)
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.private java.util.List<ImagePlus> readImages() throws FormatException, java.io.IOException
FormatException
java.io.IOException
private java.util.List<ImagePlus> readThumbImages() throws FormatException, java.io.IOException
FormatException
java.io.IOException
private java.util.List<ImagePlus> readImages(boolean thumbnail) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private ImagePlus readImage(int s, boolean thumbnail) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private ImageStack createVirtualStack(ImportProcess process, int s, java.util.List<LUT> luts) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private ImageStack readPlanes(ImportProcess process, int s, java.util.List<LUT> luts, boolean thumbnail) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private ImageProcessor[] readProcessors(ImportProcess process, int no, loci.common.Region r, boolean thumbnail) throws FormatException, java.io.IOException
FormatException
java.io.IOException
ImportProcess.setId()
private void startTiming()
private void updateTiming(int s, int i, int current, int total)
private void finishTiming()
private FileInfo createFileInfo()
private boolean[] getPlanesToLoad(int s)
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 static java.lang.String[] substringsBetween(java.lang.String str, java.lang.String open, java.lang.String close)
Copyright © 2018 Open Microscopy Environment