first of all I gotta say its my very very first time trying to write a macro in FIJI.
My macro is supposed to measure simply the area and the amount of particals from my images. As I have different sets of images with different objects, its important to set the threshold by myself. This i successfully implemented.
I have two other issues though:
First of all my macro only allows me to only process one image at a time. I would love to run the macro directly over a whole folder.
Second, my biggest issue lies in saving my data. I have two different tables generated: “Summarize” and “display results”. I would love to be asked where to save it and how to call the generated file for both of them individually.
Here is my macro:
file=File.openDialog("select image") print(file) open(file); run("Threshold...") waitForUser("Set the threshold, then press ok") //run("Threshold..."); setOption("BlackBackground", true); run("Convert to Mask"); run("Set Measurements...", "area display redirect=None decimal=3"); run("Analyze Particles...", "summarize + display results"); dir = getDirectory("choose where to save the summary"); run("Measure"); name = getTitle; dotIndex = indexOf(name, "."); saveAs("Results", name + ".csv"); close()