Dear all,
I have a problem starting a macro run from the command line. I am
installing the macro like this:
hajaalin@biotek973:~/Software/Fiji.app$ cat macros/AutoRun/Install.ijm
run("Install...", "install=[" + getDirectory("imagej") +
"/macros/Misha_3.ijm]");
run("Install...", "install=[" + getDirectory("imagej") +
"/macros/Misha_0.ijm]");
(BTW there seems to be bug here, only the latter macro will be installed.)
The test macro is very simple:
hajaalin@biotek973:~/Software/Fiji.app$ cat macros/Misha_0.ijm
macro "Misha_0" {
print("");
print("This is Misha0.ijm");
print("");
}
If I now start ImageJ / Fiji without any arguments...
hajaalin@biotek973:~/Software/Fiji.app$ ./ImageJ-linux64
... the macro appears in the menu. However, if I try to actually use the
macro like this...
hajaalin@biotek973:~/Software/Fiji.app$ ./ImageJ-linux64 -run "Run Misha"
... where Run_Misha.py is script that reads a list of input image files....
hajaalin@biotek973:~/Software/Fiji.app$ cat plugins/Scripts/Run_Misha.py
from ij import IJ
print "This is Run_Misha.py"
file=open("/home/hajaalin/tmp/inputfiles.txt","r")
lines=file.readlines()
file.close()
plugin="Misha0"
for l in lines:
filename = l.rstrip()
imp = IJ.openImage(filename)
print imp
print "Running " + plugin + " for " + repr(imp)
IJ.run(imp,plugin,"")
.... I get an error dialog saying that Misha0 is an unknown command. So
it means that the Run_Misha script is executed before the AutoRun script.
How should this be done? Is there any way to lower the priority of the
-run command? I am currently using Fiji version v1.48c.
Once this works, the next step is to make it run headless.
Thanks, best regards,
Harri
--
__________________________________________________
Harri Jäälinoja
Light Microscopy Unit
Institute of Biotechnology, University of Helsinki
http://www.biocenter.helsinki.fi/bi/lmu/+358 9 191 59370 fax +358 9 191 59366
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html