You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This page was last revised for [version 5.0.6](https://github.com/morphonets/SNT/releases)**.
17
+
**This page was last revised for [version 5.0.10](https://github.com/morphonets/SNT/releases)**.
18
18
{% endcapture %}
19
19
{% include notice content=version %}
20
20
@@ -63,6 +63,32 @@ ROIs generated programmatically or in bulk outside SNT can be applied in a singl
63
63
Delineations can also be created from [neuropil annotations](/plugins/snt/analysis#atlas-based-analysis) using the _Import Assignments from Atlas Annotation_ option from the Options (gear) menu. In this case delineations are created from selected brain compartments associated with the cell(s) being analyzed. Note that this requires cells to be tagged by atlas annotations. Currently only cells downloaded directly from the MouseLight database fulfill this criterion.
64
64
65
65
66
+
## Creating Delineations from Label Images
67
+
Delineations can be imported from segmentation (label) images produced by tools such as [Labkit](/plugins/labkit), [Weka](/plugins/tws), [cellpose](https://cellpose.readthedocs.io/en/latest/), or similar. Each unique non-zero integer value in the label image becomes a delineation, with path nodes assigned to whichever label they overlap. To import:
68
+
69
+
1. Open the label image in Fiji. The image should contain non-negative integer pixel values, with 0 as background. Its spatial dimensions must match those of the tracing image
70
+
71
+
2. In the Delineations tab, choose _Import Assignments from Label Image_ from the Options (gear) menu
72
+
73
+
3. If multiple candidate images are open, a dialog allows you to choose which one to import. Hyperstacks are excluded; only the first channel/frame of multi-dimensional images is considered
74
+
75
+
Each label value is mapped to a new delineation entry. Path nodes whose coordinates fall within a labeled region are assigned to the corresponding delineation. Nodes outside all labels remain non-delineated.
76
+
77
+
{% capture label-validation %}
78
+
SNT validates the selected image before importing: it must contain only non-negative integers with a bounded number of unique classes (≤ 500). If the image dimensions do not match the tracing image, a warning is displayed. Nodes whose coordinates fall outside the label image bounds are skipped.
79
+
{% endcapture %}
80
+
{% include notice icon="info" content=label-validation %}
81
+
82
+
83
+
## Exporting Delineations as Label Images
84
+
Delineation assignments can be exported back to a label image using _Export Assignments to Label Image_ from the Options (gear) menu. This generates a new image in which each voxel within a traced neurite is labeled by its delineation assignment. The export uses tube-based rasterization, filling each path's volume based on node radii. Each delineation is assigned a unique positive integer label; background voxels remain zero. This is useful for visualizing delineation assignments in 3D, or for downstream analysis in other tools.
85
+
86
+
{% capture export-note %}
87
+
Export requires paths to have delineation assignments. If all assignments were made via ROIs or atlas annotations (rather than from a label image), the export still works: it rasterizes whatever assignments exist. The output is a 16-bit image; if there are more than 65,535 unique labels, values may overflow.
88
+
{% endcapture %}
89
+
{% include notice icon="info" content=export-note %}
90
+
91
+
66
92
## Editing Delineations
67
93
To re-define a delineation it is sufficient to re-define or re-adjust an existing ROI and press the _Assign_ button. The Options (gear) menu lists commands for rebuilding, restoring, and deleting delineations. Most of the editing operations can be performed through the toolbar at the bottom of the delineations list, including:
68
94
- <iclass="fas fa-plus"></i> Adds more entries to the delineations list
@@ -72,12 +98,25 @@ To re-define a delineation it is sufficient to re-define or re-adjust an existin
72
98
-_Outside color_ widget: Defines the color for non-delineated sections, i.e., those sections that remain _outside_ delineated areas
73
99
74
100
101
+
## Hierarchical Labels and Level-split Analysis
102
+
103
+
Delineation names support hierarchical labeling using the `::` separator. For example, naming three delineations `Cortex::L1`, `Cortex::L2/3`, and `Cortex::L5` encodes both the parent region (Cortex) and the individual layers. This convention is particularly useful for atlas-imported delineations, where compartments are naturally hierarchical.
104
+
105
+
When hierarchical labels are present, the _Measure_ and _Plot_ commands prompt for a **grouping level** before running the analysis. This allows measurements to be aggregated at different levels of granularity without redefining the delineations themselves. For example, with delineations named `Cortex::L1::proximal`, `Cortex::L1::distal`, and `Cortex::L2/3`:
106
+
107
+
-**Level 1** groups everything under `Cortex` into a single entry
108
+
-**Level 2** groups by layer (`Cortex::L1` combines proximal and distal; `Cortex::L2/3` remains separate)
109
+
-**Level 3 (full)** reports each delineation individually
110
+
111
+
The level-split prompt only appears when at least one delineation name contains the `::` separator. The _Non-delineated_ and _Unaffected paths_ categories always pass through unchanged regardless of the chosen level.
112
+
113
+
75
114
## Measuring Delineations
76
115
77
116
Measurements are retrieved using the <iclass="fas fa-chart-bar"></i> _Plot_ and <iclass="fas fa-table"></i> _Measure_ buttons:
78
117
79
118
- <iclass="fas fa-chart-bar"></i> _Plot_: Plots distributions of selected metrics. Plotting styles include: Box plots (one delineation per category), multi-series histograms (one delineation per series), or a montage of single-series histograms (one panel per delineation)
80
-
- <iclass="fas fa-table"></i> _Measure_: Reports common metrics to a dedicated table (Total length, No. of nodes, No. of junctions, etc.) across delineations
119
+
- <iclass="fas fa-table"></i> _Measure_: Reports common metrics to a dedicated table (Total length, No. of nodes, No. of junctions, etc.) across delineations. When delineations were imported from a label image, the table includes additional distance-to-boundary statistics computed via calibrated Euclidean Distance Transforms (EDT): _Mean dist. to boundary_, _Min dist. to boundary_, _Max dist. to boundary_, and _Fraction inside_ (the proportion of nodes with zero distance, i.e., fully contained within the label). These columns are only populated for label-image-based delineations
81
120
82
121
In addition to defined delineations, plots and tables may include two other categories:
83
122
@@ -86,3 +125,8 @@ In addition to defined delineations, plots and tables may include two other cate
86
125
-_Unaffected paths_: This category corresponds to full paths that have no XY coordinates inside any delineation. _Unaffected paths_ retain their rendered colors
87
126
88
127
{% include notice icon="info" content="Topological constraints may not allow certain metrics to be computed for a particular delineation. E.g., a metric that requires a [graph-theoretic tree](./analysis#graph-based-analysis) may not be computed for a delineation defined by a non-contiguous ROI." %}
128
+
129
+
{% capture proximity-relation %}
130
+
Delineation analysis measures _aggregate_ properties of paths within labeled regions (lengths, node counts, distance statistics). To identify _specific contact points_ where paths approach or touch labeled structures, use the [Label Proximity Detector](/plugins/snt/spines-varicosities#label-proximity-detection), which emits navigable bookmarks or ROIs at individual contact locations.
131
+
{% endcapture %}
132
+
{% include notice icon="info" content=proximity-relation %}
Copy file name to clipboardExpand all lines: _pages/plugins/snt/faq.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ See [Sholl Analysis › FAQ](./sholl#faq).
129
129
## Spine Analysis
130
130
131
131
### Does SNT support spine analysis?
132
-
See [Spine/Varicosity Analysis](./spines-varicosities). In-depth quantification of spine morphology can be done using [Spot Spine](/plugins/spot-spine), after tracing dendrites in SNT.
132
+
See [Spine/Varicosity/Label Analysis](./spines-varicosities). In-depth quantification of spine morphology can be done using [Spot Spine](/plugins/spot-spine), after tracing dendrites in SNT.
Copy file name to clipboardExpand all lines: _pages/plugins/snt/manual.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,6 +202,11 @@ See [Analysis › Strahler Analysis](/plugins/snt/analysis#strahler-analysis).
202
202
203
203
#### Utilities
204
204
205
+
#### Ontology Browser...
206
+
Opens a standalone reference window for browsing brain-region ontologies (currently Allen CCF and Drosophila FBbt). The browser is intended for quickly looking up an acronym or ID while tracing or analyzing data.
207
+
208
+
The browser is shared across ontology-aware features in SNT, including the [Reconstruction Viewer](/plugins/snt/reconstruction-viewer)'s atlas navigator and the [Delineations tab](#delineations-tab) when using atlas annotations.
209
+
205
210
#### Create Dendrogram
206
211
Generates a Dendrogram plot of a connected component (i.e, one rooted tree structure in the Path Manager). See [Analysis › Graph-based Analysis](/plugins/snt/analysis#graph-based-analysis) for details.
207
212
@@ -538,7 +543,7 @@ Described in [Curation Assistant](./curation#curation-assistant).
538
543
539
544
## Bookmarks Tab
540
545
541
-
This tab hosts the Bookmark Manager, a utility that stores image locations to be (re)visited during tracing (e.g., a location of an ambiguous branching point or an ambiguous cross-over between two neurites). Bookmarked locations can also be used as [spine/varicosity markers](/plugins/snt/spines-varicosities). The basic usage is as follows:
546
+
This tab hosts the Bookmark Manager, a utility that stores image locations to be (re)visited during tracing (e.g., a location of an ambiguous branching point or an ambiguous cross-over between two neurites). Bookmarked locations can also be used as [spine/varicosity markers](/plugins/snt/spines-varicosities) or as output from the [Label Proximity Detector](/plugins/snt/spines-varicosities#label-proximity-detection). The basic usage is as follows:
@@ -839,7 +844,7 @@ Assigns a constant radius to all the nodes of selected Path(s). This setting onl
839
844
840
845
#### Specify No. Spine\Varicosity Markers...
841
846
842
-
Assigns the no. of markers (e.g., spines or varicosities) to be associated to selected path(s) (see [Spine/Varicosity Analysis](/plugins/snt/spines-varicosities)).
847
+
Assigns the no. of markers (e.g., spines or varicosities) to be associated to selected path(s) (see [Spine/Varicosity/Label Analysis](/plugins/snt/spines-varicosities)).
843
848
844
849
#### Ramer-Douglas-Peuker Downsampling...
845
850
@@ -1107,14 +1112,15 @@ NB:
1107
1112
1108
1113
-*Integration metric* The statistics (Mean, Median, Sum, etc.) integrating pixel intensities within *shape*.
1109
1114
1110
-
#### Spines/Varicosities ›
1115
+
#### Spine/Varicosities/Labels ›
1111
1116
1112
-
This menu contains tools for detecting and analyzing spines, varicosities, boutons, and other features along or around traced paths. It includes two automated detectors and tools for working with manual annotations:
1117
+
This menu contains tools for detecting and analyzing spines, varicosities, boutons, and other features along or around traced paths, as well as proximity contacts with labeled structures from segmentation images. It includes three automated detectors and tools for working with manual annotations:
1113
1118
-**Detect Maxima Around Paths...**: Detection of intensity peaks in perpendicular cross-sections outside the path centerline (off-skeleton)
1114
1119
-**Detect Swellings Along Paths...**: Detection of radius swellings along the neurite centerline (on-skeleton)
1120
+
-**Detect Label Proximity...**: Detection of contact points between paths and labeled surfaces from a segmentation image (e.g., from [Labkit](/plugins/labkit), [Weka](/plugins/tws), or cellpose). Computes calibrated distance transforms for each label and identifies path nodes within a configurable distance threshold. Supports both threshold mode (all nodes within distance) and closest-approach mode (one detection per path–label pair)
1115
1121
-**Commands for handling manually placed markers**
1116
1122
1117
-
These tools are detailed in [Spine/Varicosity Analysis](/plugins/snt/spines-varicosities).
1123
+
These tools are detailed in [Spine/Varicosity/Label Analysis](/plugins/snt/spines-varicosities).
0 commit comments