Created
June 3, 2015 15:26
-
-
Save miura/d396b62be3815881a90e 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
cc=0; | |
for(k=0; k<nSlices; k++) | |
for(j=0;j<getHeight();j++) | |
for(i=0;i<getWidth();i++) | |
{setSlice(k+1);if(getPixel(i,j)>0)cc++;} | |
print("non-0:" + cc); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
count non-0 pixels in a stack.