PCAnalyzer Class Documentation#

Package: sc.fiji.snt.analysis

Utility class for performing Principal Component Analysis (PCA) on various SNT data structures including Trees, Paths, and collections of SNTPoints.

This class provides methods to compute the principal axes of 3D point data, which represent the directions of maximum variance in the data. This is useful for analyzing the overall orientation and shape characteristics of neuronal structures, meshes, and other 3D geometries.

Methods#

Getters Methods#

static getPrincipalAxes(Vertices)

Computes the principal axes for a collection of SNTPoints.

static getVariancePercentages(PCAnalyzer$PrincipalAxis;)

Computes the variance percentages for an array of principal axes. This is a convenience method that returns the percentage of total variance explained by each principal axis.

Other Methods#

static orientTowardDirection(PCAnalyzer$PrincipalAxis;, [D)

Orients principal axes so the primary axis points toward a reference direction, i.e., the primary axis is oriented to minimize the angle with the reference direction. If the primary axis points away from the reference (dot product < 0), it’s flipped.

static orientTowardTips(PCAnalyzer$PrincipalAxis;, Tree)

Convenience method to orient existing principal axes toward a tree’s tips centroid. For several topologies, this orients the primary axis is so it aligns with the general growth direction of the arbor.

See Also#