Skip to content

Instantly share code, notes, and snippets.

@bhive01
Last active January 12, 2016 21:22
Show Gist options
  • Save bhive01/33723fc6a725dc30a5d3 to your computer and use it in GitHub Desktop.
Save bhive01/33723fc6a725dc30a5d3 to your computer and use it in GitHub Desktop.
Matisse Colors
run("Options...", "iterations=1 count=1 edm=Overwrite");
run("Line Width...", "line=1");
run("Colors...", "foreground=black background=white selection=magenta");
run("Clear Results");
run("Close All");
print("\\Clear");
run("ROI Manager...");
run("Input/Output...", "jpeg=90 gif=-1 file=.csv use_file copy_row save_column save_row");
run("Set Measurements...", "area mean standard modal min centroid center perimeter bounding fit shape feret's integrated median skewness kurtosis area_fraction stack redirect=None decimal=3");
open();
orig = getTitle();
run("Duplicate...", "title=findcircles");
selectWindow("findcircles");
run("8-bit");
setAutoThreshold("Huang");
setOption("BlackBackground", false);
run("Convert to Mask");
run("Analyze Particles...", "size=12000-Infinity add");
selectWindow("findcircles");
run("Close");
for (i=0; i<roiManager("count"); i++) {
selectWindow(orig);
run("Select None");
roiManager("select", i)
run("Duplicate...", "title=isolatecircle");
saveAs("jpg", File.directory+File.separator+i+"_circle");
run("Close");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment