Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarokiritani/733594ba395b01de64e9c8262980a792 to your computer and use it in GitHub Desktop.
Save tarokiritani/733594ba395b01de64e9c8262980a792 to your computer and use it in GitHub Desktop.
imagej macro that preprocesses confocal image stack for cell counting
run("Bandpass Filter...", "filter_large=100 filter_small=5.1 suppress=None tolerance=5 autoscale process");
for(i=1;i<nSlices + 1;i++){
setSlice(i);
getStatistics(area, mean, min, max, std, histogram);
setThreshold(mean + 2 * std, 255);
run("Make Binary", "slice");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment