When input image is not a numpy array but rather a dask array, median is problematic:
line 1800, in median
raise NotImplementedError(
NotImplementedError: The da.median function only works along an axis. The full algorithm is difficult to do in parallel