Last active
August 29, 2015 13:57
-
-
Save mutterer/9834369 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resetThreshold(); | |
run("Remove Overlay"); | |
n = roiManager("count"); | |
Dialog.create("Choix"); | |
Dialog.addChoice("paramètre", newArray("Area","Mean","Circ."),""); | |
Dialog.show(); | |
param = Dialog.getChoice(); | |
m=moy(param); | |
for (i=0;i<n;i++) { | |
roiManager("select",i); | |
if (getResult(param,i)<m) { | |
run("Properties... ", "name=[] position=none stroke=none width=0 fill=red"); | |
} else { | |
run("Properties... ", "name=[] position=none stroke=none width=0 fill=green"); | |
} | |
run("Add Selection..."); | |
} | |
run("Select None"); | |
function moy(param) { | |
n = roiManager("count"); | |
t=0; | |
for (i=0;i<n;i++) { | |
t=t+getResult(param,i); | |
} | |
return (t/n); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment