I am using Fiji for medical imaging purpose.I had written a jython script and would like to run the same from command prompt in windows 7.I tried out different ways for running the script but could not do so.Somebody please help in achieving the desired goal.
Asked
Active
Viewed 1,140 times
2 Answers
2
There is two ways to run scripts with Fiji.
Poor way
Open console and change working directory to Fiji folder. This folder should contain ImageJ binary (e.g. ImageJ-win64.exe), jars, plugins etc. Run something like
cd c:\Fiji.app
Run ImageJ. ImageJ-win64.exe - just binary name in my distribution. It's may vary.
ImageJ-win64.exe --headless --jython my_script.py
You also can read Fiji help there, just run ImageJ-win64.exe --help
Proper way
Add Fiji folder (c:\Fiji.app) to PATH variable and run scripts from any directory.
-
I am running a script that uses imports like ij and loci (Bio-formats), is the "Proper way" still working? Does the compiler find the jar files in the Fiji app? I am asking because I can actually run my scripts in jython from anywhere, but these jar files are then not found, as they are probably in the Fiji.app somewhere. – Lisa B. May 06 '21 at 11:04
1
See Running scripts in headless mode on the Fiji wiki.
If you still have trouble, please provide more information about what you have tried and what went wrong; see How do I ask a good question? for details.