I am plotting the 3d contours of some 3d scalar field using mayavi.mlab.contour3d. It works very well but I would like to extract the data associated with these contours so I can compute the volume contained in the 3d contours / isosurfaces. Does anyone know if it possible to access this information and how ?
For now I have tried to look in the different attributes of the object generated by :
import mayavi.mlab as mlab
obj = mlab.contour3d(scalar_field)
where scalar_field is any 3D scalar field.
But obj is constituted of many objects as well so this method seems laborious.
I might just iterate through one axis of my 3D data and compute 2d contours instead but this might also be inefficient.