Launch Fiji from the command line?

  • Here is what I want to do:

I want to run FIji from the command line to do something like batch image processing. I believe that by typing some command on some console, you can run several batch files to run the macro. In this case, the FIji GUI will not be displayed, but processing will be performed behind the scenes.

  • Here is what I did:

I just tried Fiji headless , but when I tried ./Build.sh misc/headless.jar , as suggested on the Internet, the console prompt returns not to find the project for artefactID 'headless'; I also tried the Javassist , pretty much just built it, but didn't understand how to use it.

  • Here is the problem I am facing:

When I print fiji --headless HelloWorldMacro.ijm nothing happened where inside HelloWorldMacro.ijm there is printf("Hello world!");

I am wondering how do I start fiji from the command line? Is this what I tried on the right track? If so, what additional work / changes are needed to make it work? Thank you very much.

+6
source share
1 answer

For the record:

Johannes Schindelin answered this question on the ImageJ mailing list (further indicating why the ImageJ mailing list is the most appropriate place for this type of discussion).

In short, one of the following actions should be performed:

 fiji --headless --console HelloWorldMacro.ijm 

or

 fiji --headless HelloWorldMacro.ijm > output.txt cat output.txt 
+5
source

All Articles