Search in sources :

Example 1 with Opener

use of ij.io.Opener in project GDSC-SMLM by aherbert.

the class FolderOpenerDialog method openImage.

private ImagePlus openImage(String filename) {
    //System.out.printf("Opening %s %s\n", path, filename);
    Opener opener = new Opener();
    opener.setSilentMode(true);
    Utils.setShowProgress(false);
    ImagePlus imp = opener.openImage(path, filename);
    Utils.setShowProgress(true);
    if (imp != null) {
        // Initialise dimensions using first image 
        if (width == -1) {
            width = imp.getWidth();
            height = imp.getHeight();
        }
        // Check dimensions
        if (!variableSize) {
            if (width != imp.getWidth() || height != imp.getHeight())
                imp = null;
        }
    }
    return imp;
}
Also used : ImagePlus(ij.ImagePlus) Opener(ij.io.Opener) FolderOpener(ij.plugin.FolderOpener)

Aggregations

ImagePlus (ij.ImagePlus)1 Opener (ij.io.Opener)1 FolderOpener (ij.plugin.FolderOpener)1