如何将顶点和面转换为点和多边形?

时间:2020-02-21 07:45:30

标签: polygon vertex nifti

从.nifti文件的体积数据中,一个程序提取 polys pts ,另一个程序提取 vertex faces < / strong>。

它们的大小相同,但值却大不相同... 有什么好方法可以互相交谈吗?

np.shape(vert)
(9496, 3)
array([[ 86.5, 261. , 293. ],
       [ 86.5, 261. , 294. ],
       [ 86.5, 262. , 293. ],
       ...,
       [113.5, 229. , 302. ],
       [113. , 229.5, 302. ],
       [113. , 229. , 302.5]], dtype=float32)


np.shape(faces)
(18988, 3)
array([[ 138,  120,    0],
       [ 122,  140,    1],
       [ 166,  181,    9],
       ...,
       [3478, 2955, 2954],
       [2979, 2954, 2980],
       [2955, 2980, 2954]], dtype=uint32)


np.shape(pts)
(9496, 3)
array([[106.275, 120.15 , 150.041],
       [106.116, 119.955, 150.018],
       [105.708, 120.043, 150.023],
       ...,
       [100.732, 129.496, 172.63 ],
       [100.677, 129.651, 172.665],
       [100.606, 129.828, 172.697]])


np.shape(polys)
(18988, 3)
array([[   0,    1,    2],
       [   0,    3,    4],
       [   1,    0,    4],
       ...,
       [9494, 9463, 9495],
       [9465, 9495, 9468],
       [9466, 9468, 9495]], dtype=uint32)

0 个答案:

没有答案