Package sc.fiji.snt.analysis
Class RootAngleAnalyzer
java.lang.Object
sc.fiji.snt.analysis.RootAngleAnalyzer
Class to perform Root angle analysis on a
Tree according to Bird and Cuntz 2019,
PMID 31167149.- Author:
- Tiago Ferreira
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRootAngleAnalyzer(Tree tree) Constructs a RootAngleAnalyzer for the given tree. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the balancing factor, computed fromcentripetalBias().doubleReturns the strength of the centripetal bias, also known as κ.doubleComputes the Cramér-von Mises statistic between computed root angles and fitted von Mises distribution.Generates a density plot of the root angles using the fitted von Mises distribution.static SNTChartgetDensityPlot(List<RootAngleAnalyzer> analyzers) org.apache.commons.math3.stat.descriptive.DescriptiveStatisticsgetHistogram(boolean polar) Assembles the histogram distribution of root angles.static SNTChartgetHistogram(List<RootAngleAnalyzer> analyzers, boolean polar) getTaggedTree(String lutName, double min, double max) Returns a recolored copy of the analyzed tree with the root angles assigned to its node values.getTaggedTree(net.imglib2.display.ColorTable colorTable) Returns a recolored copy of the analyzed tree with the root angles assigned to its node values.getTaggedTree(net.imglib2.display.ColorTable colorTable, double min, double max) Returns a recolored copy of the analyzed tree with the root angles assigned to its node values.static voiddoublemax()doublemean()doubleReturns the mean direction of the fitted von Mises distribution.doublemin()
-
Field Details
-
BALANCING_FACTOR
- See Also:
-
CENTRIPETAL_BIAS
- See Also:
-
MEAN_DIRECTION
- See Also:
-
-
Constructor Details
-
RootAngleAnalyzer
Constructs a RootAngleAnalyzer for the given tree.- Parameters:
tree- the tree to analyze.- Throws:
IllegalArgumentException- if tree contains multiple roots or loops
-
-
Method Details
-
getAngles
- Returns:
- the list of root angles sorted from leaves to root (in degrees).
-
getTaggedGraph
- Returns:
- the graph of the tree being parsed. Vertices are tagged with the root angles (@see
PointInImage.v).
-
getTaggedTree
- Returns:
- the tree with the root angles assigned to its node values (@see
PointInImage.v).
-
getTaggedTree
Returns a recolored copy of the analyzed tree with the root angles assigned to its node values.- Parameters:
colorTable- the color table specifying the color mapping. Null not allowed.- Returns:
- a copy of the tree with the root angles assigned to its nodes under default min/max mapping.
-
getTaggedTree
Returns a recolored copy of the analyzed tree with the root angles assigned to its node values.- Parameters:
colorTable- the color table specifying the color mapping. Null not allowed.min- the mapping lower bound (i.e., the smallest angle to be mapped to the first color on the LUT scale)max- the mapping upper bound (i.e., the largest angle to be mapped to the last color on the LUT scale)- Returns:
- a copy of the tree with the root angles assigned to its nodes.
-
getTaggedTree
Returns a recolored copy of the analyzed tree with the root angles assigned to its node values.- Parameters:
lutName- the LUT name specifying the color mapping. Null not allowed.min- the mapping lower bound (i.e., the smallest angle to be mapped to the first color on the LUT scale)max- the mapping upper bound (i.e., the largest angle to be mapped to the last color on the LUT scale)- Returns:
- a copy of the tree with the root angles assigned to its nodes.
-
getDescriptiveStatistics
public org.apache.commons.math3.stat.descriptive.DescriptiveStatistics getDescriptiveStatistics()- Returns:
- the descriptive statistics of the root angles (in degrees).
-
getAnalysis
-
min
public double min()- Returns:
- Returns the smallest of root angles (in degrees).
-
max
public double max()- Returns:
- Returns the largest of root angles (in degrees).
-
mean
public double mean()- Returns:
- Returns the arithmetic mean of root angles (in degrees).
-
meanDirection
public double meanDirection()Returns the mean direction of the fitted von Mises distribution.- Returns:
- the mean direction (in degrees).
-
centripetalBias
public double centripetalBias()Returns the strength of the centripetal bias, also known as κ. κ is defined as the concentration of the von Mises fit of the root angle distribution. κ= 0 indicate no bias (root angles are distributed uniformly). K->∞ indicate that all neurites point directly toward the root of the tree- Returns:
- Returns the centripetal bias, or κ (dimensionless, range: [0, ∞[).
-
balancingFactor
public double balancingFactor()Returns the balancing factor, computed fromcentripetalBias().- Returns:
- the balancing factor (dimensionless, range: [0, 1]).
-
getHistogram
Assembles the histogram distribution of root angles.- Parameters:
polar- whether the histogram should be polar.
-
getDensityPlot
Generates a density plot of the root angles using the fitted von Mises distribution. The plot displays the density of root angles in degrees.- Returns:
- an SNTChart object representing the density plot of the root angles.
-
getCramerVonMisesStatistic
public double getCramerVonMisesStatistic()Computes the Cramér-von Mises statistic between computed root angles and fitted von Mises distribution. A value of 0 indicates a perfect fit between the empirical distribution and the theoretical distribution, and larger values indicate a greater discrepancy between the two distributions.- Returns:
- the Cramér-von Mises statistic. Range: [0, ∞[ (dimensionless).
-
getHistogram
-
getDensityPlot
-
supportedMetrics
-
main
-