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;
}
Aggregations