【问题标题】:How to run imageJ from terminal at current folder?如何从当前文件夹的终端运行 imageJ?
【发布时间】:2018-05-21 19:41:33
【问题描述】:

我需要在 macOS 上从终端运行 Fiji(imageJ) 脚本。使用下面的代码。

/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless -macro ~/desktop/testing.ijm.ijm

而我需要运行的斐济脚本是

dir = getDirectory("Where I need help");
run("Image Sequence...", "open=dir");
path=dir+"needsave.avi";
run("AVI... ", "compression=JPEG frame=5 save=&path");
close();

但是我希望目录成为终端中的当前位置。 例如:

MYs-MBP:~ csh;
[MYs-MBP:~] cd desktop/test/test2
[MYs-MBP:~/desktop/test/test2] /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless -macro ~/desktop/testing.ijm.ijm

因此我将使用我编写的斐济脚本处理 test2 中的所有内容。

【问题讨论】:

    标签: terminal macros imagej fiji


    【解决方案1】:

    使用这个宏命令:

    cwd = call("java.lang.System.getProperty", "user.dir");
    

    请注意,此问题已交叉发布到 ImageJ 邮件列表 (1) 和 ImageJ 论坛 (2)。

    以后,在交叉发帖时,请链接到您提出问题的所有其他地方,以保护那些回答您问题的人的时间。

    【讨论】:

      猜你喜欢
      • 2014-04-12
      • 1970-01-01
      • 2012-11-18
      • 2020-05-09
      • 2021-11-27
      • 2013-04-30
      • 1970-01-01
      • 2013-06-05
      • 2015-02-28
      相关资源
      最近更新 更多