Class LabelProximityDetector

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

public final class LabelProximityDetector extends Object
Detects contact points between traced paths and labeled surfaces (from a segmentation/label image). For each unique label, a calibrated Euclidean Distance Transform (EDT) is computed, and path nodes within a configurable distance threshold are emitted as Detections.

Two detection modes are supported:

  • Threshold mode (LabelProximityDetector.Config.distanceThreshold > 0): all nodes whose EDT distance is ≤ the threshold are detected.
  • Closest-approach mode (LabelProximityDetector.Config.distanceThreshold = 0): for each path–label pair, only the node closest to the label boundary is detected.
Author:
Tiago Ferreira
See Also:
  • Method Details

    • detect

      public static List<Detection> detect(Collection<Path> paths, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> labelImg, LabelProximityDetector.Config config)
      Detects proximity contacts between paths and labeled surfaces.
      Parameters:
      paths - the paths to analyze
      labelImg - the label (segmentation) image
      config - detection configuration
      Returns:
      list of detections (may be empty)
      Throws:
      IllegalArgumentException - if labelImg is not a valid label image