macro

Save individual roi into independent png with id for curation of custom coco-like dataset

dir=getDirectory("image");
name=getTitle;
dot = indexOf(name, ".");
if (dot >=0) name = substring(name, 0, dot);
path=dir+name+"_cell_";
n = roiManager("count");
for (i=0; i<n; i++) {
roiManager("select", i);
run("Create Mask");
saveAs("png", path+i);
close();
}



Comments