label_boundaries problem with ndim = label_img.ndim