seung-lab / connected-components-3d

Connected components on discrete and continuous multilabel 3D & 2D images. Handles 26, 18, and 6 connected variants; periodic boundaries (4, 8, & 6)
GNU Lesser General Public License v3.0
356 stars 42 forks source link

Add Remove Dust Function #83

Closed william-silversmith closed 2 years ago

william-silversmith commented 2 years ago

This is probably one of the most common uses of cc3d and it's easy to screw it up and make it run slow.

Probably need to support three modes:

william-silversmith commented 2 years ago
# voxels? thresh > 1 but single voxels would be ambigious and have the opposite action
cc3d.dust(img, threshold=123) 
cc3d.dust(img, threshold=0.3) # fraction? 0 <= thresh <= 1
william-silversmith commented 2 years ago

All other functions can be achieved with computing image statistics and using the voxel dust function. This was completed in #84