```{index} single: Filters; Compute Feature Centroids from Triangle Geometry
```
# Compute Feature Centroids from Triangle Geometry

## Group (Subgroup)

Statistics (Morphological)

## Description

This **Filter** determines the centroids of each **Feature** in a **Triangle Geometry**. The centroids are determined
using the following algorithm:

1. Query each triangle within the **Triangle Geometry** to determine its two owners
2. Add the 3 nodes of that triangle to the set of nodes bounding those two owners (*Note that a set will only allow each
   node to be entered once for a given owner*)
3. For each **Feature**, find the average (x,y,z) coordinate from the set of nodes that bound it

### Filter Parameters

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Triangle Geometry | Geometry Selection | Triangle | The complete path to the Geometry for which to calculate the normals |

### Input Triangle Face Data

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Face Labels | Array Selection | Allowed Types: int32 Comp. Shape: 2 | The DataPath to the FaceLabels values. |

### Input Face Feature Data

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Face Feature Attribute Matrix | AttributeMatrixSelection |  | The DataPath to the AttributeMatrix that holds feature data for the faces |

### Output Face Feature Data

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Calculated Centroids | DataObjectName |  | Centroid values created in the Face Feature Data |
| Is Periodic | Bool |  | Should segment features wrap around the image data |

## Example Pipelines

## License & Copyright

Please see the description file distributed with this plugin.

## DREAM3D-NX Help

If you need help, need to file a bug report or want to request a new feature, please head over to the [DREAM3DNX-Issues](https://github.com/BlueQuartzSoftware/DREAM3DNX-Issues/discussions) GitHub site where the community of DREAM3D-NX users can help answer your questions.
