Scikit 图像行进立方体

Scikit Image Marching Cubes

我正在使用行进立方体算法的 Scikit Image 实现来生成等值面。

verts, faces,normals,values = measure.marching_cubes(stack,0)

生成以下错误:

ValueError: need more than 2 values to unpack

但是

 verts, faces = measure.marching_cubes(stack,0)

工作正常,所以算法似乎根本没有为 normalsvalues 生成值。有没有人遇到过此类问题?

此外,我不明白算法 faces 输出的必要性,因为网格中每个三角形的一组 3 个顶点应该足以描述等值面?

docs of marching_cubes on the development version of scikit-image show that it should return normals and values as well. However it has only been introduced recently. They were not returned in version 0.12, as can be seen in the docs from that version. To get them you'd have to update to the current development version. A guide on how to install the development version can be found here.

从版本 0.14 marching_cubes() 已删除

skimage.measure.marching_cubes 已被删除,取而代之的是 skimage.measure.marching_cubes_lewiner

所以请确保您使用的是哪个版本。