我需要在macOS上从终端运行斐济(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中的所有内容。