Search in sources :

Example 1 with DisplayHandler

use of loci.plugins.in.DisplayHandler in project bioformats by openmicroscopy.

the class BF method openImagePlus.

public static ImagePlus[] openImagePlus(ImporterOptions options) throws FormatException, IOException {
    ImportProcess process = new ImportProcess(options);
    if (!process.execute())
        return null;
    DisplayHandler displayHandler = new DisplayHandler(process);
    if (options != null && options.isShowOMEXML()) {
        displayHandler.displayOMEXML();
    }
    ImagePlusReader reader = new ImagePlusReader(process);
    ImagePlus[] imps = reader.openImagePlus();
    if (options != null && options.showROIs()) {
        displayHandler.displayROIs(imps);
    }
    if (!options.isVirtual()) {
        process.getReader().close();
    }
    return imps;
}
Also used : ImagePlusReader(loci.plugins.in.ImagePlusReader) DisplayHandler(loci.plugins.in.DisplayHandler) ImportProcess(loci.plugins.in.ImportProcess) ImagePlus(ij.ImagePlus)

Aggregations

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