Question

  • Here is what I want to do:

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.

  • Here is what I have done:

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.

  • Here is the problem I am encountering:

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top