Skip to content

Commit

Permalink
Update to non-deprecated skimage APIs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 519644734
  • Loading branch information
mjanusz authored and Copybara-Service committed Mar 27, 2023
1 parent 1aa0a0a commit 7c9a5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connectomics/segmentation/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def erode(labels: np.ndarray, radius: int = 2, min_size: int = 50):
struct = skimage.morphology.disk(radius)
else:
struct = skimage.morphology.ball(radius)
eroded = skimage.morphology.erosion(eroded, selem=struct)
eroded = skimage.morphology.erosion(eroded, footprint=struct)

# Preserve small components.
mask = np.in1d(labels.flat, small_segments).reshape(labels.shape)
Expand Down

0 comments on commit 7c9a5c2

Please sign in to comment.