Skip to content

Instantly share code, notes, and snippets.

@romainGuiet
Created July 3, 2019 09:23
Show Gist options
  • Save romainGuiet/e918f60e994f174dde5689472117e483 to your computer and use it in GitHub Desktop.
Save romainGuiet/e918f60e994f174dde5689472117e483 to your computer and use it in GitHub Desktop.
an ImageJ macro to make ROIs from image with labels
roiManager("reset");
getStatistics(area, mean, min, max, std, histogram);
for (i = 1; i <= max; i++) {
setThreshold(i, i);
run("Create Selection");
Roi.setName(IJ.pad(i,6))
roiManager("Add");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment