Save individual ROI files

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Save individual ROI files

Hi Guys!,

I am trying to batch create individual ROI files using the Analyse particle function in Fiji/imageJ using a macro function. Unfortunately, I cannot figure out how to individually save the files with unique names. Using the macro function it will just save all the ROI files with the same name. I read on another forum that I can also just save and use the Mask with the ROI as a TIF instead of saving only the ROI coordinates.

This is what I have so far:

waitForUser("set the threshold and press OK, or cancel to exit macro");
setOption("BlackBackground", false);
run("Convert to Mask");
run("Invert LUT");

//ROI part
run("Analyze Particles...", "size=0.50-Infinity circularity=0.20-1.00 clear include add");
waitForUser("Select and delete the inappropriate ROIs");
roiManager("saveAs(".zip")("choose a data folder")

Thanks a lot for your help!