seung-lab / cloud-volume

Read and write Neuroglancer datasets programmatically.
https://twitter.com/thundercloudvol
BSD 3-Clause "New" or "Revised" License
130 stars 45 forks source link

is there a way to remove parts of a mesh where the skeleton is not fully connected #602

Open copypasteearth opened 10 months ago

copypasteearth commented 10 months ago

Hi I am trying to alter a mesh to get rid of the parts that are attached to the main feature. Like vessels that come out of a skull in a nondecal scan of bone and vessels

Screenshot 2023-10-27 at 12 12 35 AM

so im thinking there might be some type of mesh manipulation I can do to change the segmentation to only have the fully connected main feature the skull. where all of the edges are connected. I tried connected components but vessels are connected to the bone, i am trying to get rid of the vessels and just keep the bone

thank you for your time

william-silversmith commented 8 months ago

Hi! Sorry, I just saw this question. I hope you are not still struggling with this question.

One approach that immediately springs to mind is a technique called "garbing" the skeleton where you generate a mesh from the overlapping spherical radii from each skeleton vertex. There may be some libraries that do this.

I'm just heading to bed, so I'll try to approach this question again during the workweek.

william-silversmith commented 8 months ago

One other thing you can try is morphological opening of the mesh / image.

Also, you can try using the radius attribute and orientation of the skeleton to identify nodes that are in the vessels and cut them out.