Class PeripathDetector

java.lang.Object
sc.fiji.snt.analysis.detection.PeripathDetector

public class PeripathDetector extends Object
Detects intensity maxima (varicosities, spines, synaptic puncta) in annular cross-sections around traced paths. At each path node, a perpendicular cross-section is sampled from the image (see PathFitter), masked to an annulus defined by the node's radius (inner) and a configurable outer radius, and then analyzed for local maxima with prominence filtering via MaximumFinder. Detections from adjacent cross-sections are deduplicated via greedy non-maximum suppression.

Usage:

   PeripathDetector.Config cfg = new PeripathDetector.Config()
       .innerRadiusMultiplier(0.5)  // start at 0.5× node radius (closer to skeleton)
       .outerRadiusMultiplier(2.0)  // search up to 2× node radius
       .prominence(50)              // MaximumFinder noise tolerance
       .mergingDistance(1.5);        // NMS radius in calibrated units
   List<Detection> hits = PeripathDetector.detect(paths, image, cfg);
 
Author:
Tiago Ferreira
See Also:
  • Method Details

    • detect

      public static <T extends net.imglib2.type.numeric.RealType<T>> List<Detection> detect(Collection<Path> paths, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> img, PeripathDetector.Config cfg)
      Detects intensity maxima along the given paths.
      Parameters:
      paths - the paths to analyze (must have calibrated spacing)
      img - the detection image (single channel). Coordinates are in the same space as the paths.
      cfg - detection parameters
      Returns:
      list of detections, deduplicated and optionally assigned to nearest path
      Throws:
      IllegalArgumentException - if paths or image is null/empty
    • createTorusMask

      public static <T extends net.imglib2.type.numeric.RealType<T>> void createTorusMask(Collection<Path> paths, net.imglib2.RandomAccessibleInterval<T> output, PeripathDetector.Config cfg, double fillValue)
      Creates a binary torus mask around the given paths. At each node, the annular search region (as defined by the PeripathDetector.Config) is back-projected into the output image, painting voxels inside the torus with the specified fill value.
      Type Parameters:
      T - pixel type of the output image
      Parameters:
      paths - the paths to generate the torus for
      output - the output image to paint into
      cfg - detection/annulus parameters (inner/outer radius settings)
      fillValue - the value to write into torus voxels
      Throws:
      IllegalArgumentException - if paths or output is null/empty
    • createTorusMask

      public static void createTorusMask(Collection<Path> paths, ij.ImagePlus output, PeripathDetector.Config cfg, double fillValue)
      Creates a binary torus mask around the given paths, writing into an ImagePlus.
      Parameters:
      paths - the paths to generate the torus for
      output - the output image to paint into
      cfg - detection/annulus parameters
      fillValue - the value to write into torus voxels
      Throws:
      IllegalArgumentException - if paths or output is null/empty
      See Also: