How do I edit this website?

SNT › Spine/Varicosity Analysis

This page was last revised for version 5.0.7.

Spine/Varicosity Analysis

Currently, SNT supports detection, annotation, and density analysis of bright puncta around paths. Complete shape analysis of dendritic spines can be performed using Spot Spine.

Automated Detection

SNT can automatically detect intensity maxima (spines, varicosities, synaptic puncta) in the vicinity of traced paths using the Peripath Detector. At each path node, a perpendicular cross-section is sampled from the image, masked to an annular region around the neurite, and analyzed for local maxima via prominence filtering. Detections from adjacent cross-sections are deduplicated automatically. The detection algorithm is the same used by ImageJ’s ProcessFind Maxima…

💡

You can follow these instructions using FileLoad Demo Dataset… and choosing Hippocampal neuron (Neuronal receptors) or Hippocampal neuron (Synaptic labeling) datasets:

  1. Choose a neurite of interest. Adjust cursor size to the neurite thickness using ⌃ Ctrl +  Mouse Wheel
  2. Trace a small path (finish it by Double Click)
  3. Run AnalyzeSpines/VaricositiesDetect Maxima Around Paths…

To run AnalyzeSpines/VaricositiesDetect Maxima Around Paths…, select first the path(s) of interest (or none to include all). The command’s dialog provides the following parameters:

  • Detection channel The image channel to analyze (1-based; only for multi-channel images)

  • Inner radius The inner boundary of the search annulus. In Multiplier mode, this is a fraction of each node’s fitted radius (e.g., 0.5 starts searching at half the local dendrite thickness, catching maxima near the membrane edge). In Absolute mode, a fixed radius in calibrated units. Default multiplier: 1.0

  • Outer radius The outer boundary of the search annulus. In Multiplier mode, a multiple of each node’s radius (e.g., 2.0 searches up to 2× the local thickness). In Absolute mode, a fixed radius in calibrated units. Default multiplier: 2.0

💡

To detect puncta specifically at the neurite membrane, use Multiplier mode with a narrow band around 1.0 (e.g., inner = 0.95, outer = 1.05). This creates a thin annulus centered on the membrane edge, assuming paths have been traced with accurate radii.

  • Prominence Noise tolerance for maxima detection, in image intensity units. A maximum is only accepted if it protrudes above its surrounding saddle by at least this value. Higher values yield fewer, more prominent detections. The channel’s intensity histogram (AnalyzeHistogram) can help guide this choice: set prominence well above the noise floor (the spread of background intensities) but below the typical peak-to-saddle difference of real features. Default: 5% of the channel’s dynamic range

  • Merging distance Minimum separation between detections in physical units. Nearby detections are merged, keeping the brightest. Set to 0 for automatic (defaults to the outer radius)

  • Output Results can be exported as ROIs (added to the ROI Manager, grouped per path with path name and color) or as Bookmarked locations (added to the Bookmark Manager)

Detected counts are automatically assigned to each path’s spine/varicosity tally. Paths with fitted radii will produce better results, as the annulus adapts to local neurite thickness.

Advanced: Torus Mask Segmentation

The annular search region used by the Peripath Detector can also be exported as a binary mask via scripting. This generates a 3D torus-shaped volume around each path, defined by the same inner and outer radius parameters used for detection. The mask can then be used to extract or quantify signal in the vicinity of traced neurites independently of detection (e.g., to measure mean fluorescence intensity around dendrites, or to isolate peri-neuronal signal for downstream analysis).

Note that the mask is a voxel-level approximation of the continuous search annulus; small gaps may appear due to discretization. A morphological closing operation can be applied to fill these if a contiguous volume is needed.

See ScriptsDemosPeripath Detection Demo (TemplatesNeuroanatomyAnalysisPeripath Detection Demo in the Script Editor) for a working example that runs detection and generates the torus mask on one of the demo datasets.

Manual Annotation

This approach uses manually placed multi-Point ROIs along paths as markers for neurite features. Currently only counts and densities are supported. A typical workflow proceeds as follows:

💡

You can follow these instructions using FileLoad Demo Dataset… and choosing the L-systems fractal (Toy neuron) dataset.

  1. Run AnalyzeSpines/VaricositiesSpine/Varicosity Analysis Help… in the Path Manager to have offline instructions available in a dedicated dialog
  2. Pause SNT from the contextual menu, and select the multipoint tool from ImageJ’s toolbar
  3. Click over the features to be counted. Point placement may not need to be accurate, but with 3D images points should be placed on the same plane (Z-plane) as the feature being counted. Skip this step if you are running a programmatic routine that automatically annotates locations
  4. Once you have placed all the points, select the Path(s) associated with the features (or select none, if all Paths are to be considered) and run Path Manager’s AnalyzeSpines/VaricositiesCompute Densities from Annotations…. The dialog allows you to specify:

    • Source of Multi-point ROI(s) The location of the markers. Particularly useful if the ROIs are being generated programmatically and stored in the ROI Manager. It also allows bookmarked locations to be parsed as markers

    • Max. association distance The maximum allowed distance between a point and its path in physical units. This option is ignored if set to -1 (the default). This works as follows: for every point ROI, the closest path node is identified. The ROI is only considered to be associated with a path if its distance to the closest path node is less than or equal to Max. association distance.

    • Add extracted counts to ROI Manager Generates new ROIs from the assigned counts and adds them to the ROI Manager. This allows you to validate the extraction and ensure the assignments are correct, as each ROI gets tagged by its associated Path.

NB:

  • Point ROIs can also be generated programmatically or in a semi-automated way, e.g.:
    • Create a freehand area ROI around the path(s) of interest
    • Run ImageJ’s ProcessFind Maxima…. Detection will be restricted to the freehand selection
  • SNT only keeps a tally of the features being counted and location of ROIs are not saved in .traces files, so you may want to save the multipoint ROIs for future reference

  • ImageJ has several ways to expedite handling of multipoint ROIs:
    • Left Click on a point and drag to move it
    • ⌥ Alt +  Left Click on a point to delete it
    • To delete multiple points, create an area selection while holding down ⌥ Alt
    • Use EditSelectionSelect None to delete a multi-point selection
    • Use EditSelectionRestore Selection to restore a deleted multipoint selection
    • Double Click on the Multi-point tool in the ImageJ toolbar for further options