我需要运行宏,但我不想显示图像。如果我不调用 imp.show(),ImageJ 将打印到控制台没有打开的图像。那么如何在不显示图像的情况下运行宏呢?提前致谢。
public class MyPlugin implements PlugIn {
public static void MyPlugin(String path) {
System.setProperty("plugins.dir", "libraries/plugins");
System.setProperty("macros.dir", "libraries/macros");
Opener opener = new Opener();
ImagePlus imp = opener.openImage(path);
imp.show();
IJ.run(imp, "Skeletonize", "");
runMacroFile("libraries/macros/FindJunctions", "");
imp.close();
}