Package sc.fiji.snt.analysis.detection
Class PeripathDetector
java.lang.Object
sc.fiji.snt.analysis.detection.PeripathDetector
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImmutable configuration with builder-like setters. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateTorusMask(Collection<Path> paths, ij.ImagePlus output, PeripathDetector.Config cfg, double fillValue) Creates a binary torus mask around the given paths, writing into anImagePlus.static <T extends net.imglib2.type.numeric.RealType<T>>
voidcreateTorusMask(Collection<Path> paths, net.imglib2.RandomAccessibleInterval<T> output, PeripathDetector.Config cfg, double fillValue) Creates a binary torus mask around the given paths.detect(Collection<Path> paths, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> img, PeripathDetector.Config cfg) Detects intensity maxima along the given paths.
-
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 thePeripathDetector.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 foroutput- the output image to paint intocfg- 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 anImagePlus.- Parameters:
paths- the paths to generate the torus foroutput- the output image to paint intocfg- detection/annulus parametersfillValue- the value to write into torus voxels- Throws:
IllegalArgumentException- if paths or output is null/empty- See Also:
-