code: def _not_empty(self, view, slice_):
          
  
          img2d = self._get_axis(self._image, view, slice_)
          return (np.count_nonzero(img2d) / img2d.size) > self._min_density
docs: Checks if the density is too low.