Need help making a 3D mesh given co-ordinates of the vertices and vertex indices of each face for 3D Slicer - trimesh/vtkwrite/etc

jsalas424
Thu, 28 Jul 2022 04:27:13 +0000
Support

Hi all,

Given the following data:

1. The Cartesian co-ordinates of the vertices in the surface mesh: n vertices x 3

2. The vertex indices of each face in the surface mesh: n faces x 3

I’m trying to make some 3D file that I can readily import to 3D Slicer for registration against a 2nd VTK file.

Faces: 339,263,314340,315,263340,293,315368,314,313368,339,314369,263,33936 - Pastebin.com
Vertices: 16.215,13.236,126.06516.149,14.237,125.70816.843,13.707,125.85115.178,14.2 - Pastebin.com

I have been trying various packages/libraries etc.

I’ve tried Trimesh in Python and am running into issues probably due to my poor Python ability. I’m opening a Stackoverflow question about that separately. I’ve used vtkwrite but the “Precision” option is broken in the package and it’s doing some odd-rounding that is changing the original data too much.

From the supporting data formats page, it seems like I want something other than VTK that will preserve orientation.

How are ya’ll overcoming this?

3 posts - 2 participants