# Average Mesh and mesh scalar operations

**URL:** https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649
**Category:** Support
**Created:** [October 19, 2022, 8:23pm UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649 "2022-10-19T20:23:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Connor.Bowley](https://discourse.vtk.org/user_avatar/discourse.vtk.org/connor.bowley/32/3933_2.png) [@Connor.Bowley](https://discourse.vtk.org/u/Connor.Bowley)
#### Post date: [October 19, 2022, 8:23pm UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649/1 "2022-10-19T20:23:58Z")

</div>

Are there any vtk filters that support the following operations, and if there is not, would anyone be opposed to the addition of said filters into VTK?

Given a set of meshes in point correspondence:

- Compute the average mesh (each point is the average of the corresponding points in the input meshes)
- Compute the mean of the input meshes’ scalar values at each point
- Compute the variance of the input meshes’ scalar values at each point
- Compute the standard deviation of the input meshes’ scalar values at each point

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [October 20, 2022, 12:57am UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649/2 "2022-10-20T00:57:37Z")

</div>

Is all this over time ? The vtkAdaptiveTemporalInterpolator is close but not the same.

---

<div class="post-metadata">

### Author: ![Connor.Bowley](https://discourse.vtk.org/user_avatar/discourse.vtk.org/connor.bowley/32/3933_2.png) [@Connor.Bowley](https://discourse.vtk.org/u/Connor.Bowley)
#### Post date: [October 20, 2022, 12:19pm UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649/3 "2022-10-20T12:19:26Z")

</div>

Not necessarily over time. From looking at the vtkAdaptiveTemporalInterpolator it is interpolating (per the name 🙂 ). I am more looking to enable statistical analysis across different meshes for the [SlicerSALT](https://salt.slicer.org/) project.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [October 21, 2022, 6:13pm UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649/4 "2022-10-21T18:13:24Z")

</div>

I would expect that VTK statistics classes (e.g., [vtkDescriptiveStatistics](https://vtk.org/doc/nightly/html/classvtkDescriptiveStatistics.html)) can compute these values.

---

<div class="post-metadata">

### Author: ![Connor.Bowley](https://discourse.vtk.org/user_avatar/discourse.vtk.org/connor.bowley/32/3933_2.png) [@Connor.Bowley](https://discourse.vtk.org/u/Connor.Bowley)
#### Post date: [October 21, 2022, 6:18pm UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649/5 "2022-10-21T18:18:07Z")

</div>

Do you know of a good/built-in way to convert a vtkPolyData with scalars into a vtkTable?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [October 21, 2022, 7:35pm UTC](https://discourse.vtk.org/t/average-mesh-and-mesh-scalar-operations/9649/6 "2022-10-21T19:35:15Z")

</div>

There are conversion filters (`...ToTable` classes), but you can also add data arrays manually to a table using `AddColumn()` method.
