Search in sources :

Example 1 with ImporterPrompter

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;
}
Also used : ImagePlusReader(loci.plugins.in.ImagePlusReader) ImportProcess(loci.plugins.in.ImportProcess) ImporterPrompter(loci.plugins.in.ImporterPrompter) ImagePlus(ij.ImagePlus)

Aggregations

ImagePlus (ij.ImagePlus)1 ImagePlusReader (loci.plugins.in.ImagePlusReader)1 ImportProcess (loci.plugins.in.ImportProcess)1 ImporterPrompter (loci.plugins.in.ImporterPrompter)1