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.
0 个评论
采纳的回答
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 个评论
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 Center 和 File 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!