use of ij.ImagePlus in project bioformats by openmicroscopy.
the class ImporterTest method defaultBehaviorTester.
// ******** specific testers **********************************
/**
* tests BioFormats when directly calling BF.openImagePlus(path) (no options set)
*/
private void defaultBehaviorTester(int pixType, int x, int y, int z, int c, int t) {
String path = constructFakeFilename("default", pixType, x, y, z, c, t, -1, false, -1, false, -1);
ImagePlus[] imps = null;
try {
imps = BF.openImagePlus(path);
} catch (IOException e) {
fail(e.getMessage());
} catch (FormatException e) {
fail(e.getMessage());
}
impsCountTest(imps, 1);
ImagePlus imp = imps[0];
xyzctTest(imp, x, y, z, c, t);
}
use of ij.ImagePlus in project bioformats by openmicroscopy.
the class Simple_Read method run.
public void run(String arg) {
OpenDialog od = new OpenDialog("Open Image File...", arg);
String dir = od.getDirectory();
String name = od.getFileName();
String id = dir + name;
try {
ImagePlus[] imps = BF.openImagePlus(id);
for (ImagePlus imp : imps) imp.show();
} catch (FormatException exc) {
IJ.error("Sorry, an error occurred: " + exc.getMessage());
} catch (IOException exc) {
IJ.error("Sorry, an error occurred: " + exc.getMessage());
}
}
use of ij.ImagePlus in project bioformats by openmicroscopy.
the class ROIHandler method readFromOverlays.
/**
* Returns rois if any from the overlay.
* @return See above
*/
public static Roi[] readFromOverlays() {
ImagePlus image = IJ.getImage();
Overlay overlay = image.getOverlay();
if (overlay == null)
return null;
return overlay.toArray();
}
use of ij.ImagePlus in project bioformats by openmicroscopy.
the class LociFunctions method openImagePlus.
public void openImagePlus(String path) {
ImagePlus[] imps = null;
try {
ImporterOptions options = new ImporterOptions();
options.setId(path);
options.setSeriesOn(series, true);
imps = BF.openImagePlus(options);
for (ImagePlus imp : imps) imp.show();
} catch (IOException exc) {
IJ.handleException(exc);
} catch (FormatException exc) {
IJ.handleException(exc);
}
}
use of ij.ImagePlus in project bioformats by openmicroscopy.
the class LociFunctions method openThumbImagePlus.
public void openThumbImagePlus(String path) {
ImagePlus[] imps = null;
try {
ImporterOptions options = new ImporterOptions();
options.setId(path);
options.setSeriesOn(series, true);
imps = BF.openThumbImagePlus(options);
for (ImagePlus imp : imps) imp.show();
} catch (IOException exc) {
IJ.handleException(exc);
} catch (FormatException exc) {
IJ.handleException(exc);
}
}
Aggregations