[scikit-image] Refactoring ndimage