public class ImagePlusReader extends Object implements StatusReporter
ImagePlus
objects.Modifier and Type | Field and Description |
---|---|
protected List<StatusListener> |
listeners |
protected ImportProcess |
process
Import preparation process managing Bio-Formats readers and other state.
|
static String |
PROP_LUT
Special property prefix for storing planar LUTs.
|
static 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(StatusListener l) |
private List<ImagePlus> |
applyColors(List<ImagePlus> imps) |
private List<ImagePlus> |
concatenate(List<ImagePlus> imps) |
private String |
constructImageTitle(IFormatReader r,
String file,
String seriesName,
boolean groupFiles) |
private String |
constructSliceLabel(int ndx,
IFormatReader r,
IMetadata meta,
int series,
int zCount,
int cCount,
int tCount) |
private FileInfo |
createFileInfo() |
static ImagePlus |
createImage(String title,
ImageStack stack,
List<LUT> luts)
Creates an
ImagePlus from the given image stack. |
static ImagePlus |
createImage(String title,
List<ImageProcessor> procs)
Creates an
ImagePlus from the given image processors. |
static ImageStack |
createStack(List<ImageProcessor> procs,
List<String> labels,
List<LUT> luts)
Creates an image stack from the given image processors.
|
private ImageStack |
createVirtualStack(ImportProcess process,
int s,
List<LUT> luts) |
private void |
finishTiming() |
private boolean[] |
getPlanesToLoad(int s) |
void |
notifyListeners(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 List<ImagePlus> |
readImages() |
private List<ImagePlus> |
readImages(boolean thumbnail) |
private ImageStack |
readPlanes(ImportProcess process,
int s,
List<LUT> luts,
boolean thumbnail) |
private ImageProcessor[] |
readProcessors(ImportProcess process,
int no,
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 List<ImagePlus> |
readThumbImages() |
void |
removeStatusListener(StatusListener l) |
private static void |
saveLUTs(ImagePlus imp,
List<LUT> luts) |
private List<ImagePlus> |
splitDims(List<ImagePlus> imps) |
private void |
startTiming() |
private void |
updateTiming(int s,
int i,
int current,
int total) |
public static final String PROP_SERIES
public static final String PROP_LUT
protected ImportProcess process
protected List<StatusListener> listeners
private long startTime
private long time
public ImagePlusReader() throws IOException
IOException
- if the default options cannot be determined.public ImagePlusReader(ImportProcess process)
public ImagePlus[] openImagePlus() throws FormatException, IOException
ImagePlus
objects
corresponding to the reader's associated options.FormatException
IOException
public ImagePlus[] openThumbImagePlus() throws FormatException, IOException
FormatException
IOException
public void addStatusListener(StatusListener l)
addStatusListener
in interface StatusReporter
public void removeStatusListener(StatusListener l)
removeStatusListener
in interface StatusReporter
public void notifyListeners(StatusEvent e)
notifyListeners
in interface StatusReporter
public static ImagePlus createImage(String title, 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(String title, ImageStack stack, 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(List<ImageProcessor> procs, List<String> labels, 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 List<ImagePlus> readImages() throws FormatException, IOException
FormatException
IOException
private List<ImagePlus> readThumbImages() throws FormatException, IOException
FormatException
IOException
private List<ImagePlus> readImages(boolean thumbnail) throws FormatException, IOException
FormatException
IOException
private ImagePlus readImage(int s, boolean thumbnail) throws FormatException, IOException
FormatException
IOException
private ImageStack createVirtualStack(ImportProcess process, int s, List<LUT> luts) throws FormatException, IOException
FormatException
IOException
private ImageStack readPlanes(ImportProcess process, int s, List<LUT> luts, boolean thumbnail) throws FormatException, IOException
FormatException
IOException
private ImageProcessor[] readProcessors(ImportProcess process, int no, Region r, boolean thumbnail) throws FormatException, IOException
FormatException
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 String constructImageTitle(IFormatReader r, String file, String seriesName, boolean groupFiles)
private String constructSliceLabel(int ndx, IFormatReader r, IMetadata meta, int series, int zCount, int cCount, int tCount)
Copyright © 2015 Open Microscopy Environment