janelia-flyem / gala

Automatic segmentation of electron microscopy volumes
BSD 3-Clause "New" or "Revised" License
76 stars 29 forks source link

Represent neighbours array using skimage's view_as_windows #49

Open jni opened 9 years ago

jni commented 9 years ago

Currently, build_neighbors_array creates an array of shape (volume.size, n_neighbors). This is very wasteful, and scikit-image's view_as_windows function uses numpy stride tricks to provide a much more compact view.