How to get corresponding coordinates of vertices in a 3D volume after voxelisation?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Matt J
am 7 Apr. 2023
Bearbeitet: Matt J
am 7 Apr. 2023
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 Kommentare
Matt J
am 8 Apr. 2023
Bearbeitet: Matt J
am 8 Apr. 2023
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 3-D Volumetric Image Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!