use of loci.plugins.in.ImporterPrompter in project bioformats by openmicroscopy.
the class BF method openThumbImagePlus.
public static ImagePlus[] openThumbImagePlus(ImporterOptions options) throws FormatException, IOException {
// NB: Only needed due to ImporterPrompter.
options.setQuiet(true);
// NB: Only needed due to ImporterPrompter.
options.setWindowless(true);
ImportProcess process = new ImportProcess(options);
// NB: Could eliminate this (see above).
new ImporterPrompter(process);
if (!process.execute())
return null;
ImagePlusReader reader = new ImagePlusReader(process);
ImagePlus[] imps = reader.openThumbImagePlus();
if (!options.isVirtual()) {
process.getReader().close();
}
return imps;
}
Aggregations