I want to run Fiji from command-line, to do something like batch image processing. I imagine by typing some command at some console, some batch file can be launched to execute some macro. In this case, the Fiji GUI will not show up, but the processing will be running behind the scene.
I simply tried the FIji headless , but when I tried ./Build.sh misc/headless.jar
as the web suggested, the console prompt returns could not find project for artifactID 'headless';
I also tried Javassist,pretty much just built it, but have not figure out how to use it.
When I type fiji --headless HelloWorldMacro.ijm
, nothing happened, where inside the HelloWorldMacro.ijm is printf("Hello world!");
I am wondering, how should I run FIji from command line? Is what I have tried on the right track? If so, what additional work/changes needed to make it work? Thanks a lot.
For the record:
Johannes Schindelin answered this question on the ImageJ mailing list (additionally pointing out why the ImageJ mailing list is the most suitable place for this kind of discussions).
In short, either of the following should work:
fiji --headless --console HelloWorldMacro.ijm
or
fiji --headless HelloWorldMacro.ijm > output.txt
cat output.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With