From d5bd1ac5be2241dd9cb383c419b42ca1dcca9bd4 Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Wed, 18 Dec 2024 22:15:44 -0500 Subject: [PATCH] docs(dust): show how to use the new dust features --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 328a77c..ad86262 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,12 @@ labels_out = cc3d.dust( labels_in, threshold=100, connectivity=26, in_place=False ) +# Removes objects with >= `threshold` voxels. +labels_out = cc3d.dust(labels_in, threshold=100, invert=True) +# Removes objects with < `threshold[0]` voxels and >= threshold[1] +labels_out = cc3d.dust(labels_in, threshold=[50,100]) +# Removes objects with >= `threshold[0]` voxels and < threshold[1] +labels_out = cc3d.dust(labels_in, threshold=[50,100], invert=True) # Get a labeling of the k largest objects in the image. # The output will be relabeled from 1 to N.