I'm trying to calculate the volume of an unstructured grid using mayavi and tvtk. My idea was to tetrahedronalize the Point cloud by means of the Delaunay3d-Filter. Then I Need to somehow extract the tetrahedra from this dataset while ignoring other cell-types such as lines and triangles. But how can i accomplish this? My Python code so far Looks as follows:
import numpy as np
from mayavi import mlab
x, y, z = np.random.random((3, 100))
data = x**2 + y**2 + z**2
src = mlab.pipeline.scalar_scatter(x, y, z, data)
field = mlab.pipeline.delaunay3d(src)
Can i use the field-object to retrieve the polyhedras Vertices?
Thanks in advance. frank.