Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeeKamentsky
LeeKamentsky / label_centers.py
Created March 21, 2018 15:42
Function to get centers of labels
def centers(l):
z, y, x = np.where(l > 0)
a = np.bincount(l[z, y, x])
xx = np.bincount(l[z, y, x], x)
yy = np.bincount(l[z, y, x], y)
zz = np.bincount(l[z, y, x], z)
return np.column_stack(
(zz.astype(float) / a, yy.astype(float) / a, xx.astype(float) / a))
@LeeKamentsky
LeeKamentsky / neuroglancer-alignment.ipynb
Created April 13, 2018 12:41
Neuroglancer for alignment inspection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeeKamentsky
LeeKamentsky / yea_nay.ipynb
Created June 11, 2018 13:01
nuggt.yea_nay example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.