Created
March 10, 2017 15:09
-
-
Save tarokiritani/ecfb9cc706db9ef9f773f4f6ff35fa1f to your computer and use it in GitHub Desktop.
a helper imagej macro for counting objects in 3D
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
roiManager("Show All"); | |
run("Remove Overlay"); | |
for (i=0; i<roiManager("count"); i++){ | |
roiManager("select",i); | |
roiManager("Measure"); | |
x=getResult("X"); | |
y=getResult("Y"); | |
z=getResult("Slice"); | |
for (j=-14; j<14; j++){ | |
setSlice(z+j); | |
makeRectangle(x-10,y-10,20,20); | |
run("Add Selection..."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment