pyvista.DataSetFilters.integrate_data#
- DataSetFilters.integrate_data(progress_bar=False)[source]#
Integrate point and cell data.
Area or volume is also provided in point data.
This filter uses the VTK vtkIntegrateAttributes and requires VTK v9.1.0 or newer.
- Parameters:
- Returns:
pyvista.UnstructuredGrid
Mesh with 1 point and 1 vertex cell with integrated data in point and cell data.
Examples
Integrate data on a sphere mesh.
>>> import pyvista as pv >>> import numpy as np >>> sphere = pv.Sphere(theta_resolution=100, phi_resolution=100) >>> sphere.point_data["data"] = 2 * np.ones(sphere.n_points) >>> integrated = sphere.integrate_data()
There is only 1 point and cell, so access the only value.
>>> integrated["Area"][0] np.float64(3.14) >>> integrated["data"][0] np.float64(6.28)
See the Integrate Data for more examples using this filter.