How to get corresponding coordinates of vertices in a 3D volume after voxelisation?
6 ビュー (過去 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 で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!