integrate_data#

PointSet.integrate_data(progress_bar=False)#

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
progress_barbool, optional

Display a progress bar to indicate progress.

Returns
pyvista.UnstructuredGird

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
>>> import numpy as np
>>> sphere = pyvista.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]
3.14
>>> integrated["data"][0]
6.28

See the Integrate Data for more examples using this filter.