Open lxmedai opened 1 year ago
No this is as expected and there is a description in the documentation which describes this and the trade offs of this approach and a suggestion for how to center the skeleton if this is important for you. Skeletons — MeshParty documentationmeshparty.readthedocs.ioNote we developed this for neurons which are quite long and skinny and the larger length scale topology/distance is more important than centering in most scientific questions.Sent from my mobile device.On Oct 4, 2023, at 1:48 AM, lxmedai @.***> wrote: I am now testing your package for computing mesh skeleton. Here below is my code using meshparty to compute the skeleton and to visualize the results: from meshparty import trimesh_vtk, trimesh_io from meshparty.skeletonize import skeletonize_mesh
vertices, faces, normals, link_edges, node_mask = trimesh_io.read_mesh(file_path_to_obj) mesh = trimesh_io.Mesh(vertices=vertices, faces=faces, normals=normals, link_edges=link_edges, node_mask=node_mask) skeleton = skeletonize_mesh(mesh)
actor_mesh = trimesh_vtk.mesh_actor(mesh, color=(0, 0.5, 1), opacity=1) actor_skeleton = trimesh_vtk.skeleton_actor(skeleton, color=(1, 0, 0), opacity=0.5, lin_width=5) trimesh_vtk.render_actors([actor_mesh, actor_skeleton])
The returned skeleton is on the mesh surface rather than inside the mesh as I would expect. Was there anything I did wrong? It will be very much appreciated if this problem can be solved. Another minor issue for me is that I could not use the recommended way to read mesh via: mm = trimesh_io.MeshMeta() mesh = mm.mesh(file_path_to_obj)
, which would lead to error saying "AttributeError: 'NoneType' object has no attribute 'mesh'. " which points to "if not isinstance(self.cv.mesh, SharedUltilLevelPrecomputedMeshSource)" in file "trimesh_io.py". It is however unclear to me about how it should be set. But of course this is a minor problem for me since code for 'read_mesh' works.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
No this is as expected and there is a description in the documentation which describes this and the trade offs of this approach and a suggestion for how to center the skeleton if this is important for you. Skeletons — MeshParty documentationmeshparty.readthedocs.ioNote we developed this for neurons which are quite long and skinny and the larger length scale topology/distance is more important than centering in most scientific questions. Sent from my mobile device.On Oct 4, 2023, at 1:48 AM, lxmedai @.***
Thanks for the reply! Sorry that I wasn't careful enough when I read the documentation. Now the problem is that by default, the skeleton.vertex_properties['rs'] after skeleton = skeletonize_mesh(mesh)
should contain the computed mesh radii along the skeleton vertices, but the vertex_properties I got was an empty dictionary. And it was the same using skeleton = skeletonize_mesh(mesh, compute_radius=True)
. Is it possible to kindly provide some code example about how to enable centered skeleton?
I am now testing your package for computing mesh skeleton. Here below is my code using meshparty to compute the skeleton and to visualize the results:
The returned skeleton is on the mesh surface rather than inside the mesh as I would expect. Was there anything I did wrong? It will be very much appreciated if this problem can be solved. Another minor issue for me is that I could not use the recommended way to read mesh via:
, which would lead to error saying "AttributeError: 'NoneType' object has no attribute 'mesh'. " which points to "if not isinstance(self.cv.mesh, SharedUltilLevelPrecomputedMeshSource)" in file "trimesh_io.py". It is however unclear to me about how it should be set. But of course this is a minor problem for me since code for 'read_mesh' works.