Measurements
SNT provides a couple ways to measure reconstructions. To measure complete cells use Analysis › Measure… in the main SNT dialog (or Analyze & Measure › in Reconstruction Viewer). To get measurements only on a select group of Paths, first select or filter for the Paths you want to measure in the Path Manager, then use the commands in Path Manager’s Analyze › Measurements menu.
The reason for distinguishing between cell-based (i.e., branch-based) and path-based measurements is flexibility: Path-based measurements can be performed on any structures, even those with loops, while cell-based measurements require the structure to be a graph-theoretic tree. The bulk of SNT measurements is described in Metrics. Measurements available in the GUI are typically single-value metrics. Many others measurements are available via scripting.
A convenience Quick Measurements command also exists ( Analysis › menu in the main SNT dialog or Analyze & Measure › in Reconstruction Viewer), in which common metrics are immediately retrieved using default settings without prompts.
Batch measurements of reconstructions can be accomplished via scripting. See, e.g., the bundled template script Measure_Multiple_Files.py, and related batch scripts for examples.
Note on Fitted Paths:
Some cell-based metrics may not be available when mixing fitted and un-fitted paths because paths are fitted independently of one another and may not be aware of the original connectivity. When this happens, metrics may be reported as NaN and related errors reported to the Console (when running in Debug mode).
If this becomes an issue, consider fitting paths in situ using the Replace existing nodes option instead. Also, remember that you can also use the Path Manager’s Edit>Rebuild… command to re-compute relationships between paths
Statistics
SNT assembles comparison reports and simple statistical reports (two-sample t-test/one-way ANOVA) for up to six groups of cells. This is described in Comparing Reconstructions. In addition, descriptive statistics are commonly reported in histograms from Frequency/Distribution Analysis commands.
Convex Hull Analysis
Convex hull commands (in SNT main dialog, Rec. viewer and Rec. plotter) compute the 2D or 3D convex hull of a reconstruction (i.e., the smallest convex polygon/polyhedron that contains the nodes of its paths). Convex hull measurements are defined in Metrics.
Sholl Analysis
There are several entry points to Sholl Analysis in SNT. You can find those in the Neuroanatomy Shortcuts panel (Plugins › Neuroanatomy or “SNT” icon in Fiji’s toolbar):
- Sholl Analysis (Image): Direct parsing of images, bypassing tracing
- Sholl Analysis (Tracings): Parsing of reconstructions
- Sholl Analysis Scripts: These handle batch processing of files, specialized analysis, and misc. utilities
Sholl Analysis has a dedicated documentation page detailing parameters, plots, and metrics.
In the main SNT dialog, Sholl commands are available in the Analysis › menu and image contextual menu and include:
-
Sholl Analysis… Analyzes cells based on a set of pre-defined, morphology-based focal points (e.g., Soma, Root node(s): Primary apical dendrite(s)). Note that this assumes the relevant morphology tag(s) have been assigned to the set of paths being analyzed. Since the center of analysis is only determined after the prompt has been dismissed, preview of sampling shells may not be available.
-
Sholl Analysis (by Focal Point)… Analyzes cells on an exact, user-defined focal point. It is described on the following section.
-
Sholl Analysis at Nearest Node Coarser alternative to Sholl Analysis (by Focal Point)…, run from the image contextual menu by right-clicking near a node (Shortcut: ⌥ Alt + ⇧ Shift + A.
Sholl Analysis (by Focal Point)
For precise positioning of the center of analysis:
- Mouse over the path of interest. Press G to activate it
- Then, select the node to be used as focal point. This can be done in one of two ways:
- Select a node along the path as you would for forking operation: i.e., by pressing ⌥ Alt + ⇧ Shift while moving the cursor along the path (Note the “Fork Point” label appearing near the cursor on non-display canvases). With ⌥ Alt + ⇧ Shift still pressed, press A to start the analysis
- Make the path editable (right-click on the image and choose Edit Path from the contextual menu). Move the cursor along the path until the desired node is highlighted. Press ⌥ Alt + ⇧ Shift + A to start the analysis
NB: The default ⌥ Alt + ⇧ Shift modifier can be simplified in the Options tab of the main dialog.
The Sholl dialog created by this approach is a variant of the dialog created by running the Sholl › Sholl Analysis (From Tracings)… from the Neuroanatomy Shortcuts panel, with a couple of changes:
- Since the center of analysis is defined precisely on an image, radius step size can be previewed
- The Path filtering drop-down menu provides additional options to restrict the analysis to the subset of paths selected in the Path Manager
- The type of annotations is more specialized and includes:
- Color coded nodes Intersection counts will be color mapped into path nodes under the annotation LUT.
- 3D viewer labels image This generates a synthetic image holding the number of intersections at each distance from the center under annotation LUT. This image can then be fed to the “Apply Color Labels” action of the legacy 3D viewer, to “overlay” the mapping on the legacy 3D viewer scene.
Note that plots and tables can be directly saved to disk by selecting Save and specifying a valid directory in the dialog. The remaining options in the dialog are described in the Sholl documentation page.
Strahler Analysis
Similarly to Sholl Analysis, there are several entry points to Strahler Analysis in SNT. You can find those in the Neuroanatomy Shortcuts panel (Plugins › Neuroanatomy or “SNT” icon in Fiji’s toolbar):
- Strahler Analysis (Image)… Direct parsing of images, bypassing tracing
- Strahler Analysis (Tracings)… Parsing of reconstructions
- Strahler Analysis Scripts: These handle batch processing of files
Strahler Analysis (Image) has a dedicated documentation page with details on the classification.
To conduct Strahler Analysis on the current contents of the Path Manager, choose the Analysis › Strahler Analysis… in the main SNT dialog. This command will output the results of the analysis as a table and plot(s). These figures contain morphometric statistics of branches at each Horton-Strahler number. Refer to the Strahler Analysis (Image) documentation for details on the classification.
Path-based Analysis
Path-based analyses accept any traced structure (e.g., disconnected paths, paths associated with different cells, etc.), even those with loops. While most SNT measurements require traced structures to be valid mathematical trees, path-based measurements have no topological constraints. There are two commands in this category: Path Order Analysis, and Path Properties: Export CSV….
Path Order Analysis
This command (Analysis › Path-based › Path Order Analysis in the main SNT dialog) is a variant of Strahler with the following differences:
- Classification is based on Path Order: Paths are the scope of classification (not branches)
- Ranking of orders is reversed relatively to Strahler analysis (reversed Strahler orders), with primary paths having order 1 and terminal paths having the highest order
- Any collection of paths can be analyzed without validating into a formal tree
Path Properties: Export CSV…
This command (Analysis › Path-based › Path Properties: Export CSV…) exports path details morphometrics, neurite compartments, linkage relationships to other Paths, start and end coordinates, etc.) to a spreadsheet file.
Atlas-based Analysis
Atlas-based analyses require reconstruction nodes to be tagged with neuropil IDs (atlas labels) (e.g., ). Broadly, there are two types of analyses: Brain Area Frequencies and Annotations Graphs.
Brain Area Frequencies
This command (Analysis › Atlas-based › menu in main dialog, or Analyze & Measure › in Reconstruction Viewer) summarizes projection patterns across brain areas by computing frequency histograms of how often a morphometric trait (no. of tips, cable length, etc.) occurs across brain regions (neuropil labels). Such histograms can be obtained for groups of cells, isolated cells, or parts thereof.
Annotations Graphs
Annotations Graphs rely on brain annotations (i.e., neuropil labels) and are typically used to obtain unbiased, semi-quantitative summaries of projectomes or relationships between brain areas. Annotation graphs can be generated for a single cell or groups of cells. There are three major types of annotation graphs reporting neurite occupancy across brain areas/neuropil regions: 1) Sankey (flow) diagrams, 2) Ferris wheel diagrams, and 3) Boxplots:
Prompts for generation of Annotation graphs, typically require a common set of inputs to be specified:
- Metric: The morphometric trait defining connectivy (cable length, no. of tips, etc.)
- Cutoff value: Brain areas associated with less than this quantity are excluded from the diagram. E.g., if metric is “No. of Tips” and this value is 10, only brain areas targetted by at least 11 tips are reported
- Deepest ontology The highest ontology level to be considered for neuropil labels. As a reference, the deepest level for mouse brain atlases is around 10. Setting this value to 0 forces SNT to consider all depths
Other types of specialized graphs are described in Graph-based Analysis.
Graph-based Analysis
Analyses based on graph-theory are better performed via the scripting. However, SNT features a quite-capable Graph Viewer that has many built-in options for handling graph objects.
The viewer provides controls for orientation, zoom level, panning, vertex editing and traversal as well as options to customize the display vertices (shape and labels) and edges (shape and weight labels). Basic support for themes (including dark, light and formal) are also supported. The Graph Viewer canvas may be exported in several file formats, including HTML, PNG, and SVG.
Typically, the most common types of graphs handled by Graph Viewer are:
-
Graphs based on morphology: Dendrograms can be obtained from single rooted tree structure, and provide a high-level overview of neurite branching topology. In the GUI, dendrograms can be created from Utilities › Create Dendrogram in the main SNT dialog or Analyze & Measure › Create Dendrogram in Reconstruction Viewer. Typically, dendrograms are generated for single cells
-
Graphs based on brain annotations As mentioned above, these rely on brain annotations (i.e., neuropil labels). Annotation graphs can be generated for a single cell or groups of cells
Ultimately, fine-grained programmatic control over SNT’s Graph objects is achieved via scripting. Relevant resources:
- JGraphT: The underlying library handling graph theory data structures and algorithms with JAVA and Python APIs
- SNT graph package: High-level tools for graph creation within SNT
- SNT Demo Scripts: See e.g., Graph_Analysis.py and Flow_and_Ferris-Wheel_Diagrams_Demo.groovy, two SNT demo scripts
- Python notebooks: For pyimagej examples, have a look at the Hemisphere Analysis notebook
Persistence Homology
Persistent homology computes topological features of neuronal reconstructions at different spatial resolutions, which in turn can be used to obtain topological signatures of their branching patterns. The Topological Morphology Descriptor (TMD) is the first published algorithm to use persistence Homology to describe neuronal arbors. It is described in:
Kanari, L., Dłotko, P., Scolamiero, M., Levi, R., Shillcock, J., Hess, K., & Markram, H. (2017). A Topological Representation of Branching Neuronal Morphologies. Neuroinformatics, 16(1), 3–13. doi:10.1007/s12021-017-9341-1.
SNT implements TMD and TMD variants by supporting several descriptor functions:
- Radial: The Euclidean (i.e., “straight line”) distance between a node and the tree’s root, as used in the original TMD description by Kanari et al.
- Centrifugal: The reversed Strahler classification of a node
- Geodesic: The “path distance” between a node and the tree’s root
- Path order: The path order of a node
- Coordinates: The X, Y, or Z coordinate of a node
In addition, SNT also implements descriptors based on persistence landscapes, as described in Bubenik, P. (2012). Statistical topological data analysis using persistence landscapes. ArXiv. doi:10.48550/ARXIV.1207.6437.
Currently, basic persistence homology descriptors can be computed using UI commands Analysis › Persistence Homology… (main interface), or Analyze & Measure › Persistence Homology… in Rec. viewer. Complete extraction of descriptors can be obtained with scripting. See e.g., the Persistence Landscape notebook.
Comparing Reconstructions
SNT can compare up to six groups of cells. The entry point for this type of comparison is twofold:
- Utilities › Compare Reconstructions/Cell Groups… in the main SNT dialog. This includes a convenience option to compare single reconstruction files.
- Neuronal arbors › Load & Compare Groups… in Reconstruction Viewer, allowing groups to be tagged, and imported into a common scene while being compared.
The dialog prompt for this feature allows selection of up to six directories containing reconstruction files (SWC, TRACES, JSON, NDF). The metric to compare against is chosen from the Metric drop-down menu. Optionally, it is possible to restrict the analysis to specific neurite compartments. After making your selections, press OK to run the analysis. The result typically includes:
- A simple statistical report, including descriptive statistics and a two-sample t-test (when comparing two groups) or one-way ANOVA (when comparing three or more groups)
- Comparison plots for the chosen metric: Grouped histogram and boxplot
- Montages of groups. These are multi-panel vignettes of up to 10 group exemplars. These can all be exported as PDF, PNG, or SVG
SNT performs statistical tests without verifying if samples fulfill basic test-criteria (e.g., normality, variance homogeneity, sample size, etc.)
Other Specialized Analyses
See SNT Scripting, as well as script templates demonstrating a range of analysis possibilities.