How to get corresponding coordinates of vertices in a 3D volume after voxelisation?

4 次查看(过去 30 天)
I use Mesh Voxelisation to voxelise a triangular-polygon mesh. The mesh contains faces and the coordinates of vertices. My question is after voxelisation, how to find the corresponding coordinates of the vertices in the volume?
For example, if the original coordinate of the vertex is (-0.4,-0.26,0.5), how can I get the corresponding coordinate (16,69,196) in the volume. I tried to locate the original coordinates in the output gridX, gridY and gridZ, but the corresponding values in the gridOUTPUT are not always equal to 1.

采纳的回答

Matt J
Matt J 2023-4-7
编辑:Matt J 2023-4-7
Perhaps as follows,
fcn=(z,g)interp1(g,1:numel(g),z);
i=fcn(v(1),gridCOx); %v is vertex coordinate in the original space
j=fcn(v(2),gridCOy);
k=fcn(v(3),gridCOz);
  6 个评论
Huahua
Huahua 2023-4-7
I got it. Thank you very much. One of my research scenarios is to describe local surface on a volume using descriptors with invariant properties. After rotating the object and regenerating the volume, I would have liked to experiment with the vertices before and after the rotation, but I cannot now guarantee that the value of the vertex in gridOUTPUT is always equal to 1, and probably not for the other surface points either. I wonder if you have a suggestion.
Matt J
Matt J 2023-4-8
编辑:Matt J 2023-4-8
I got it. Thank you very much.
You're welcome, but please Accept-click the answer if your question has been addressed.
After rotating the object and regenerating the volume, I would have liked to experiment with the vertices before and after the rotation
It's not clear to me why you need a voxelization for that. It should be clear what happens to the vertices after a rotation of the volume. The vertices should move to new locations that should be easily predictable with a 3x3 rotation matrix. It would probably be better to elaborate on what you are doing in a new post.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by