Re: How to write macro that deletes ROI that meets certain criteria
Posted by AppleJus on Mar 18, 2017; 6:29am
URL: http://imagej.273.s1.nabble.com/How-to-write-macro-that-deletes-ROI-that-meets-certain-criteria-tp5018325p5018331.html
Hi
Please try following:
for(i=0; i<roiManager("count"); i++){
roiManager("select", i);
run("Measure");
if(getResult("Mean" > 20){
roiManager("delete");
}
}
It should hopefully more or less be what you are looking for !