Class RootAngleAnalyzer

java.lang.Object
sc.fiji.snt.analysis.RootAngleAnalyzer

public class RootAngleAnalyzer extends Object
Class to perform Root angle analysis on a Tree according to Bird and Cuntz 2019, PMID 31167149.
Author:
Tiago Ferreira
  • Field Details

  • Constructor Details

  • Method Details

    • getAngles

      public List<Double> getAngles()
      Returns:
      the list of root angles sorted from leaves to root (in degrees).
    • getTaggedGraph

      public DirectedWeightedGraph getTaggedGraph()
      Returns:
      the graph of the tree being parsed. Vertices are tagged with the root angles (@see PointInImage.v).
    • getTaggedTree

      public Tree getTaggedTree()
      Returns:
      the tree with the root angles assigned to its node values (@see PointInImage.v).
    • getTaggedTree

      public Tree getTaggedTree(net.imglib2.display.ColorTable colorTable)
      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

      public Tree 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.
      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

      public Tree getTaggedTree(String lutName, double min, double max)
      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

      public Map<String,Double> 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 from centripetalBias().
      Returns:
      the balancing factor (dimensionless, range: [0, 1]).
    • getHistogram

      public SNTChart getHistogram(boolean polar)
      Assembles the histogram distribution of root angles.
      Parameters:
      polar - whether the histogram should be polar.
    • getDensityPlot

      public SNTChart 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

      public static SNTChart getHistogram(List<RootAngleAnalyzer> analyzers, boolean polar)
    • getDensityPlot

      public static SNTChart getDensityPlot(List<RootAngleAnalyzer> analyzers)
    • supportedMetrics

      public static List<String> supportedMetrics()
    • main

      public static void main(String[] args)