Skip to content

Commit 310fd19

Browse files
committed
snt: misc corrections/updates
1 parent 767737b commit 310fd19

4 files changed

Lines changed: 52 additions & 70 deletions

File tree

‎_pages/plugins/snt/big-data.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ SNTv5 implemented _preliminary_ support for big data. The following operations a
2323
| Automated tracing | Supported (experimental) | See [Auto-tracing](./auto-tracing#grayscale-images)<sup>1,2</sup> |
2424
| Tracing along way-points | Supported in headless scripts<sup>2</sup> | A* tracing performed using pre-existing coordinates is fully supported via scripting<sup>2</sup>|
2525
| Path optimization | Supported in headless scripts<sup>2</sup> | [Optimization of curvatures](./manual#refinefit-), including extraction of radii<sup>2</sup>. |
26-
| 3D Visualization | Supported via [sciview](./manual#sciview) and [BigVolumeViewer](./manual#big-volume-viewer) | Visualization of 3D reconstructions, including [color mappings](./manual#color-mapping-), etc. |
26+
| 3D Visualization: Interactive re-slicing browser | Supported via [BigDataViewer](/plugins/bdv/) | Visualization of reconstructions, including [color mappings](./manual#color-mapping-), etc. |
27+
| 3D Visualization: Interactive volume viewer | Supported via [BigVolumeViewer](./manual#big-volume-viewer) and [sciview](./manual#sciview) | Visualization of 3D reconstructions, including [color mappings](./manual#color-mapping-), etc. |
2728

2829
<sup>1</sup>For interactive tracing, please use [HortaCloud](https://hortacloud.org/): This is SNT's development team recommended tool for tracing Terabyte-size datasets
2930

‎_pages/plugins/snt/curation.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ Flags sustained centripetal radius increases along a path. Since neurites genera
116116
A "run" is a consecutive sequence of nodes where each radius exceeds the previous. When a run's length meets or exceeds this threshold, a warning is produced.<br>
117117
**Default**: Enabled | **Severity level**: _Advisory note_ | **Range**: 3–100 (no. of nodes) |
118118

119+
### Invalid thickness: flag
120+
Identifies paths containing nodes with zero, negative, or _NaN_ radius, which typically occurs from [un-fitted nodes](./manual#correct-radii), upon path [refinement](manual#refinefit-).<br>
121+
**Default**: Enabled | **Severity level**: _Warning_ | This check has no threshold field: it is either enabled or disabled
122+
119123
### Path signal quality: min contrast
120124
Measures how well each path stands out from the background in the image. At every node (excluding the first and last), a perpendicular [cross-section is sampled](./manual#node-profiler) using a Bresenham line that extends 3× the path radius (minimum 5 px) on each side.
121125
The sampled intensities are split by percentile: the lower quartile (P25) estimates background, the upper quartile (P75) estimates signal. The contrast ratio is defined as:
@@ -260,7 +264,7 @@ A typical workflow:
260264

261265
# Detecting Crossovers
262266

263-
A crossover is a spot where at least two neurites pass very close to each other in space (so they may look like they intersect in the image) but they are not connected in the reconstructed graph (i.e., there is no shared node / true topological join). Identification of crossover sites is thus useful to disambiguate overlaps between neurites and spot possible tracing mistakes, such as missed branch-points or false merges.
267+
A crossover is a spot where at least two neurites pass very close to each other in space (so they may look like they intersect in the image) without being topologically connected. Identification of crossover sites is thus useful to disambiguate overlaps between neurites and spot possible tracing mistakes, such as missed branch-points or false merges.
264268

265269
{% include img align="center" src="/media/plugins/snt/snt-crossover.svg" caption="Overview of a crossover between two neurites.<br>Left: Seen from top, the two neurites appear to intersect. Right: rotation to front view reveals that the two paths are juxtaposed in the XZ plane." %}
266270

‎_pages/plugins/snt/manual.md‎

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ This option assumes [sciview](/plugins/sciview) to be successfully installed. sc
600600

601601
### Big Volume Viewer
602602

603-
Big Volume Viewer (BVV) is the 3D counterpart of [BigDataViewer](https://imagej.net/plugins/bdv) capable of GPU volume rendering of images too large to fit into memory. Currently, support for Big Volume Viewer remains highly experimental.
603+
Big Volume Viewer (BVV) is the 3D counterpart of [BigDataViewer](https://imagej.net/plugins/bdv) capable of GPU volume rendering of images too large to fit into memory. Currently, support for Big Volume Viewer remains experimental.
604604
{% include img align="center" name="BVV integration" src="/media/plugins/snt/snt-bvv.png" caption="BVV integration" %}
605605

606606
### Legacy 3D Viewer
@@ -778,18 +778,31 @@ This section of the toolbar allow for filtering the display of arbors in the Pat
778778

779779
- <i class="fas fa-arrows-to-eye"></i> **Hide Others**: Shows only the arbor chosen in the drop‑down. If selected the Path Manager list is filtered to the select choice. If unselected all arbors are shown. Toolbar actions (Zoom, Bookmark, see below) honor this filter.
780780

781-
## Zoom to Selected Path(s)
782-
<i class="fas fa-object-group"></i> Centers and zooms the image view to encompass the selected paths
781+
## Zoom to Path(s)
782+
<i class="fas fa-search-plus"></i> Centers and zooms the image view to encompass the selected paths
783783

784-
## Zoom to Selected Node(s)
785-
<i class="fas fa-crosshairs"></i> Navigates to specific node locations on the selected paths, such as their midpoint, first/last branch point, etc. When a single path is selected, it is also possible to navigate to its node with the smallest/largest radius
784+
## Zoom to Node(s)
785+
<i class="fas fa-search-location"></i> Navigates the canvas to a notable node along the selected path(s). The popup menu groups options into four categories:
786786

787-
## Bookmark Menu
788-
<i class="fas fa-bookmark"></i> This menu creates [bookmarks](#bookmarks-tab) at important locations. Two types of bookmarks are possible: 1) Topological locations (branch points, end-points, etc.), and 2) Quality-Control (QC) locations. The latter are locations pertinent to inspection, and review of traced paths, and include:
787+
- **Path Positions**: First Node, Last Node, Midpoint
788+
- **Structure**: First Branch Point, Last Branch Point, Sharpest Angle Node
789+
- **Thickness**: Smallest/Largest Radius Node (for paths with defined or fitted radii)
790+
- **Intensity**: Brightest/Dimmest Node (requires an image)
789791

790-
- **Manually Tagged Nodes**: Nodes you previously color‑tagged (e.g., via the tracing canvas)
791-
- **Nodes With Invalid Radius**: Nodes whose radius is [unset or invalid](#correct-radii)
792-
- **Putative Crossovers**: These are “apparent crossings” (two or more paths passing very near without being topologically connected), automatically detected by SNT's algorithms. These are described in more detail in [Curation](./curation#detecting-crossovers). Note that detecting putative crossovers can be computationally heavy for large datasets. Start with a modest selection of paths and widen it as needed
792+
With multiple paths selected, the *Path Positions* and *Structure* items collect one node per path and zoom out to fit them all in view: useful as a population overview (e.g., zoom to the bounding box of every terminal). The *Thickness* and *Intensity* items instead navigate to the single global extremum across the entire selection (the thinnest node anywhere, the dimmest node anywhere, etc.).
793+
794+
## Bookmark Locations
795+
<i class="fas fa-bookmark"></i> This menu creates [bookmarks](#bookmarks-tab) from key locations along selected path(s). The popup menu groups options into two categories:
796+
797+
- **Topology**: Branch Points, End Points, Start Points
798+
- **Annotations**: Manually Tagged Nodes (nodes color-tagged via the canvas's [Tag Active Node](#tag-active-node-t) command)
799+
800+
Each entry adds one bookmark per matching node, accumulating across every selected path.
801+
802+
{% capture qc-locations%}
803+
For algorithmically-detected quality control (QC) locations (invalid radii, putative crossovers, parallel bundles, etc.), use the [Curation Assistant](./curation#curation-assistant) instead.
804+
{% endcapture %}
805+
{% include notice icon="info" content=qc-locations %}
793806

794807

795808
## Menu Commands
@@ -813,10 +826,6 @@ Duplicates the selected path with options to duplicate just a sub-segment or a f
813826
- **Make primary** Whether the duplicated path (or group of paths) should be disconnected from their parent
814827
<img align="right" width="300" src="/media/plugins/snt/snt-duplicate-path.png" alt="Duplicate... (v4.3)" title="Duplicate... (v4.3)" />
815828

816-
#### Go To...
817-
818-
Zoom-in into specific locations of the selected path.
819-
820829
#### Rename...
821830

822831
Renames the selected Path. Only one Path may be renamed at a time because path names are expected to be unique.
@@ -829,36 +838,37 @@ Connects two paths in a parent-child relationship. The fork-point between the tw
829838

830839
Disconnects selected path(s) from all of its connections. Note that this is an undoable operation and will force connectivity of remaining paths to be rearranged.
831840

832-
#### Combine...
841+
#### Create Shared Root (Soma)...
833842

834-
Combines (connects) two or more _disconnected_ paths into one (undoable operation).
843+
Connects two or more primary paths to a new single-node root path. A dialog prompts for the location of the shared root:
835844

836-
#### Concatenate...
845+
- **Averaged origin of selected paths**: Places the root at the centroid of the starting nodes of the selected paths
837846

838-
Concatenates two or more paths into a single un-branched segment. Concatenated paths must be oriented in the same direction. Can be used to merge non-contiguous fragments from [full-automated tracing](/plugins/snt/auto-tracing) belonging to the same neurite.
847+
- **Centroid of soma ROI**: Places the root at the centroid of the active ROI. Soma-delineating ROIs can be created by [Auto-trace › Detect Soma...](/plugins/snt/auto-tracing#soma-detection)
848+
849+
- **Auto-orient paths toward root**: When enabled (default), automatically reverses paths whose end node is closer to the root than their start node. This ensures all paths point away from the shared root, which is useful when paths have inconsistent orientations. Child branch points are updated accordingly
850+
851+
This is useful, e.g., when paths around a soma have been traced without passing through it. Note that this operation alters parent-child relationships and cannot be undone.
839852

840853
{% capture hotip%}
841854
Use Path Orientation (hold {% include key keys='O' %}) to verify path orientations.
842855
{% endcapture %}
843856
{% include notice icon="info" content=hotip %}
844857

845-
#### Create Shared Root (Soma)...
846-
847-
Connects two or more primary paths to a new single-node root path. A dialog prompts for the location of the shared root:
848-
849-
- **Averaged origin of selected paths**: Places the root at the centroid of the starting nodes of the selected paths
858+
#### Combine...
850859

851-
- **Centroid of soma ROI**: Places the root at the centroid of the active ROI. Soma-delineating ROIs can be created by [Auto-trace › Detect Soma...](/plugins/snt/auto-tracing#soma-detection)
860+
Combines (connects) two or more _disconnected_ paths into one (undoable operation).
852861

853-
- **Auto-orient paths toward root**: When enabled (default), automatically reverses paths whose end node is closer to the root than their start node. This ensures all paths point away from the shared root, which is useful when paths have inconsistent orientations. Child branch points are updated accordingly
862+
#### Concatenate...
854863

855-
This is useful, e.g., when paths around a soma have been traced without passing through it. Note that this operation alters parent-child relationships and cannot be undone.
864+
Concatenates two or more paths into a single un-branched segment. Concatenated paths must be oriented in the same direction. Can be used to merge non-contiguous fragments from [full-automated tracing](/plugins/snt/auto-tracing) belonging to the same neurite.
856865

857866
{% capture hotip%}
858867
Use Path Orientation (hold {% include key keys='O' %}) to verify path orientations.
859868
{% endcapture %}
860869
{% include notice icon="info" content=hotip %}
861870

871+
862872
#### Reverse...
863873

864874
Reverses (flips) the orientation of primary path(s) so that the starting node becomes the end-node and vice versa. Can be used to correct 'anti-sense' paths created by full-automated tracing. Options:
@@ -867,22 +877,25 @@ Reverses (flips) the orientation of primary path(s) so that the starting node be
867877
- **Reverse and update child branch point(s)**: Flips node order and recalculates all child branch point indices to maintain correct connections
868878
- **Orient tree toward root**: Only reverses paths whose end node is closer to the root than their start node, ensuring all paths in the tree point away from the root. This is useful for batch-correcting inconsistent orientations without affecting already-correct paths. Child branch points are updated automatically
869879

880+
#### Specify Channel/Frame...
881+
Changes channel & time positions of selected path(s).
882+
870883
#### Specify Constant Radius...
871884

872-
Assigns a constant radius to all the nodes of selected Path(s). This setting only applies to unfitted Paths and overrides any existing values.
885+
Assigns a constant radius to all the nodes of selected path(s). This setting only applies to unfitted paths and overrides any existing values.
873886

874887
#### Specify No. Spine\Varicosity Markers...
875888

876889
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)).
877890

878-
#### Ramer-Douglas-Peuker Downsampling...
879-
880-
Simplifies paths by reducing their node density. Given an inputted maximum permitted distance between adjacent nodes, performs {% include wikipedia title="Ramer–Douglas–Peucker algorithm" %} downsampling on the selected Path(s) (undoable operation).
881-
882891
#### Correct Z-Shrinkage...
883892

884893
Corrects Z-axis shrinkage from tissue processing (e.g., histological sectioning and mounting). The command prompts for a correction factor, typically the ratio of *cut thickness / mounted thickness*. Values greater than 1 expand Z coordinates; values less than 1 compress them. If an image is loaded, a warning is displayed when corrected nodes would fall outside image bounds. This operation cannot be undone.
885894

895+
#### Downsample...
896+
897+
Simplifies paths by reducing their node density using Ramer-Douglas-Peuker downsampling. Given an inputted maximum permitted distance between adjacent nodes, performs {% include wikipedia title="Ramer–Douglas–Peucker algorithm" %} downsampling on the selected Path(s) (undoable operation).
898+
886899
#### Rebuild...
887900

888901
Analyzes and rebuilds path relationships to fix structural issues. The command first scans all paths for problems, then offers to rebuild if issues are found. Detected issues include:

‎_pages/plugins/snt/scripting.md‎

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -126,43 +126,7 @@ Note that this approach would work for both local and remote files. The result o
126126

127127
# Python Notebooks
128128

129-
Direct access to the SNT API from the [Python](https://www.python.org/) programming language is made possible through the [PyImageJ](/scripting/pyimagej) module. This enables full integration between SNT and any library in the Python ecosystem (numpy, scipy, etc.). The [Notebooks](https://github.com/morphonets/SNT/tree/-/notebooks) directory in the SNT repository contains several examples at different complexity levels.
130-
131-
Here, we will only exemplify basic functionality. Please refer to the complete [notebook examples](https://github.com/morphonets/SNT/blob/main/notebooks/) for more details. Once the Python environment is properly [setup](https://github.com/morphonets/SNT/tree/-/notebooks#snt-notebooks), one can initialize Fiji:
132-
133-
{% highlight python %}
134-
import imagej
135-
ij = imagej.init('sc.fiji:fiji', mode='interactive')
136-
{% endhighlight %}
137-
138-
Then, one import the needed SNT (Java) classes. E.g., to download a neuron reconstruction from the MouseLight database and calculate summary statistics on it, you would import the [MouseLightLoader](https://javadoc.scijava.org/SNT/index.html?sc/fiji/snt/io/MouseLightLoader.html) and [TreeStatistics](https://javadoc.scijava.org/SNT/index.html?sc/fiji/snt/analysis/TreeStatistics.html) classes:
139-
140-
{% highlight python %}
141-
from scyjava import jimport
142-
MouseLightLoader = jimport('sc.fiji.snt.io.MouseLightLoader')
143-
TreeStatistics = jimport('sc.fiji.snt.analysis.TreeStatistics')
144-
{% endhighlight %}
145-
146-
Now you can access all the attributes and methods these classes offer. Let's get a summary of the inter-node distances for a specific mouse cortical motor neuron (ID = "AA0100" in the [MouseLight database](https://ml-neuronbrowser.janelia.org/)).
147-
148-
{% highlight python %}
149-
def run():
150-
loader = MouseLightLoader("AA0100")
151-
if not loader.isDatabaseAvailable():
152-
print("Could not connect to ML database", "Error")
153-
return
154-
if not loader.idExists():
155-
print("Somehow the specified id was not found", "Error")
156-
return
157-
158-
a_tree = loader.getTree('axon', None) # compartment, color
159-
s_stats = TreeStatistics(a_tree)
160-
metric = TreeStatistics.INTER_NODE_DISTANCE
161-
summary_stats = s_stats.getSummaryStats(metric)
162-
s_stats.getHistogram(metric).show()
163-
print("The average inter-node distance is %d" % summary_stats.getMean())
164-
165-
{% endhighlight %}
129+
Direct access to the SNT API from the [Python](https://www.python.org/) programming language is made possible through the [PySNT](https://pysnt.readthedocs.io/en/latest/). This enables full integration between SNT and any library in the Python ecosystem (numpy, scipy, etc.). PySNT's [Tutorial Notebooks](https://pysnt.readthedocs.io/en/latest/notebooks/index.html) include several tutorials at different complexity levels.
166130

167131
# Fiji Scripting
168132

0 commit comments

Comments
 (0)