10.27. Compute Feature Centroids from Triangle Geometry

Group (Subgroup)

Statistics (Morphological)

Description

This filter computes the centroid (the average position of the bounding nodes) of each Feature in a Triangle Geometry (a surface mesh built from triangles).

In a surface mesh, each triangle carries a Face Labels value: a pair of Feature Ids naming the two features that meet at that triangle. These two features are the triangle’s “owners”. A Feature is the volume of material enclosed by the triangles that reference its Id. The corner points of each triangle are its nodes (also called vertices).

The centroid of each feature is determined as follows:

  1. For each triangle, read its two owners from the Face Labels array.

  2. Add the 3 nodes of that triangle to the set of nodes bounding each of those two owners. A set stores each node only once per owner, so shared nodes are not double-counted.

  3. For each Feature, average the (x, y, z) coordinates of the set of nodes that bound it to obtain the centroid.

Boundary / Exterior Label

A Face Labels value of -1 indicates the exterior of the sample (the triangle faces open space rather than another feature). Feature Id -1 is the exterior and is not a real feature; its accumulated “centroid” entry is therefore not physically meaningful and should be ignored.

Units

Centroid coordinates are reported in the geometry length units of the Triangle Geometry vertices (for example, micrometers if the mesh coordinates are stored in micrometers).

Required Input Sources

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

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 GitHub site where the community of DREAM3D-NX users can help answer your questions.