I have made a macro in fiji/imagej that i would like to activate via the terminal in a shell script. As it now stands, the macro does not need any inputs, I just want to make fiji run the macro when activated from the terminal, and save its output in the output folder. The script for the macro looks like this:
input = "/Users/matsboh/Documents/PhD/Experiment/Image analyses/Raw/";
output = "/Users/matsboh/Documents/PhD/Experiment/Image analyses/Results/";
setBatchMode(true);
list = getFileList(input);
for (i = 1; i == list.length; i++){
var im = i;
name = "raw_" + im + ".jpg";
dir_name = input + name;
open(dir_name);
run("Subtract Background...", "rolling=50 light");
run("8-bit");
run("Make Binary");
name = "results_" + im + ".csv";
dir_name = output + name;
run("Analyze Particles...", "size=100-20000 show=Nothing display clear");
saveAs("Measurements", dir_name);
close();
}
If this is possible, how would i precede?
Cheers,
Mats