4

enter image description hereI have data describing the volume contained within 3D cell wall structures, both voxel data (1 inside cell wall, 0 outside cell wall) and surface meshes (3D coordinates and associated triangulations). What I'm after is simply the global outline of the cell shape.

All cells have a hollow region in the centre (filled with 0 for the voxels as it's outside the cell wall). For most cells, this is completely enclosed within the cell wall, so that both the mesh and voxels form a 3D shell. This is fine as it's trivial for me to fill in the central region. However, in some cases there is a hole so that the inner opening has a direct 'tunnel' to outside of the cell, as shown in the attached picture. I need to close this, as I just want the outline of the whole cell shape. The problem is then how do I close up this tunnel to the inside? The cell has a rough surface with many minor concave regions that are fine, though this massive concave region extending all the way to the cell centre is unacceptable.

I've tried using the alpha shape algorithm but all examples I found in 3D used Delauney triangulation which doesn't work well with my data (I used the code from the top answer here: Alpha shapes in 3D). Could this be a possible solution if used together with my own surface mesh triangulation? Or are there any better ways? Essentially a 3D concave hull algorithm is what I'm after I think. I'm working in Python.

Thank you so much for any ideas.

harry
  • 41
  • 3
  • Do you really mean con**cave** hull? – Davis Herring Aug 24 '20 at 22:20
  • 1
    Does the library you're using to handle this 3D data have dilate/contract (grow/shrink) operations? Dilate by an amount greater than half the diameter of the unwanted hole, then contract by the same amount. That should plug up the hole, but will tend to blur other details. – jasonharper Aug 25 '20 at 03:49
  • You could raycast from the empty voxel's location into N evenly distributed directions. If you hit a voxel of your model in all cases, then the voxel is inside such a "hole". – Jan Schultke Aug 25 '20 at 09:26
  • Yes concave hull I think, so it allows minor concave regions, but any deeper concave regions, like the central hole, would be closed (via some threshold of 'concaveness'). Convex hull I believe would just obscure all shape detail. – harry Aug 26 '20 at 12:03
  • The dilate & contract method works well. It closes up the 'tunnel', and I can easily fill the resulting hole. This does come with some obscuring of detail as you say, but I think this is the best method. Many thanks – harry Aug 26 '20 at 12:05

0 Answers0