removing one-voxel bridges between clusters?

5 views (last 30 days)
sukhraj virdee
sukhraj virdee on 27 Mar 2023
Edited: Matt J on 30 Mar 2023
Say I have a 3D computed tomography (CT) image, which I convert to a binary image of ones and zeros. I would like to remove one-voxel bridges that attach two larger clusters of ones together to get two seperate clusters instead of one. How would I go about this?

Answers (1)

Matt J
Matt J on 27 Mar 2023
Perhaps using imopen?
  5 Comments
sukhraj virdee
sukhraj virdee on 30 Mar 2023
This seems to remove clusters smaller clusters smaller then 9 voxels in size. What if I would like to keep those?
Matt J
Matt J on 30 Mar 2023
Edited: Matt J on 30 Mar 2023
Save the smaller clusters to a separate image using bwareafilt or bwareaopen. Then use that image to restore them later.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!