Run Fiji from command line?
Asked Answered
I

1

6
  • 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.

Illustrator answered 15/1, 2014 at 15:1 Comment(1)
I don't understand why someone is voting this question down? For what reasons could you please tell me here whoever did this? Thanks.Illustrator
S
6

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
Seta answered 16/1, 2014 at 10:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.