Closed xleEmesent closed 2 years ago
This is an intentional feature of the approach/algorithm. I've written an extensive discussion on it in the documentation https://meshparty.readthedocs.io/en/latest/guide/skeletons.html
If having a centered skeleton is important for your use case, there is an approach to move the skeletons half the SDF distance perpendicular to the mesh surface and then smooth the result, this works OK, but if your use case really demands precise centering than a different more computationally intensive skeletonization procedure might be a better way to go. Voxel based skeletonization is possible but is expensive when not done in bulk, and mesh shrinking approaches work well but don't guarantee a tree like topology, so again.. depends on what you are trying to do with it.
@fcollman , thanks for your reply.
Yes, I am interesting in both the topology and precise centering. Regarding to the toplogy, I have used the same code but with a more complex mesh. It turns out some branches and part of the main branches missed.
Any thoughts on possible causes here? Thanks.
This has to do with the parameters of the algorithm, namely the invalidation_d. The defaults were designed for mammalian neurons assuming mesh vertices were in nm units. If you have a different mesh you will likely need to adjust a lot of parameters to make it work right for you, and so you'll have to read the documentation about how the algorithm works to understand how they should be tuned.
In this case, you should turn down the invalidation distance.. which should be set to on order the distance 'around' the main branches you are interested in skeletonizing in the units of the mesh vertices.
@fcollman , Thanks for your advice. I will have a good read on the documentation.
@fcollman , after your tip. I realised that the input mesh has max distance to the surface roughly around 12 meters. By resetting the invalidation_d down to much smaller parameters. Topology can be captured without loss in this case. Many Thanks again.
excellent, there are some more computationally intensive but potentially more accurate ways to estimate the caliber and curvature of the mesh at each point which can help you create a centered skeleton, I gave a sketch of them conceptually in the documentation but let me know if you need help running those.
Hi, MeshParty Team.
I am skeletonize the mesh provided by MeshParty. But many resulted skeleton vertices are on the surface of the mesh instead of inside the mesh. Are there any extra steps such as parameters I have missed here? Many Thanks here.
The test mesh is from "precomputed://gs://neuroglancer-public-data/kasthuri2011/ground_truth",