Class AutoTraceConfig

java.lang.Object
sc.fiji.snt.tracing.auto.AutoTraceConfig

public class AutoTraceConfig extends Object
Derives AbstractGWDTTracer configuration parameters from one or more example paths. This is the "learn from example" mechanism: the user traces or selects a representative neurite, and this class extracts morphometric and signal properties to autofill tracer settings.

Usage:


   AutoTraceConfig config = AutoTraceConfig.fromPaths(paths, sourceImage, spacing);
   config.applyTo(tracer);
 

If input paths lack fitted radii, a non-destructive fit is attempted automatically (PathFitter.setReplaceNodes(boolean) = false).

Author:
Tiago Ferreira
  • Method Details

    • fromPaths

      public static AutoTraceConfig fromPaths(List<Path> paths, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> source, double[] spacing)
      Derives auto-trace configuration from one or more example paths.
      Parameters:
      paths - representative paths (at least one required)
      source - the grayscale image being traced
      spacing - voxel dimensions [x, y, z] in physical units
      Returns:
      a new configuration with derived parameters
      Throws:
      IllegalArgumentException - if paths is null or empty
    • applyTo

      public <T extends net.imglib2.type.numeric.RealType<T>> void applyTo(AbstractGWDTTracer<T> tracer)
      Applies this configuration to a tracer, setting all derived parameters. Parameters that could not be derived (NaN) are left at the tracer's current defaults.
      Type Parameters:
      T - pixel type
      Parameters:
      tracer - the tracer to configure
    • getSummary

      public String getSummary()
      Returns a human-readable summary of the derived configuration, suitable for display in a dialog or log.
      Returns:
      multi-line summary string
    • getScoreMapScales

      public double[] getScoreMapScales()
    • getBackgroundThreshold

      public double getBackgroundThreshold()
    • getMinBranchIntensityLength

      public double getMinBranchIntensityLength()
    • getBranchTuneMaxAngle

      public double getBranchTuneMaxAngle()
    • getReconnectMinContraction

      public double getReconnectMinContraction()
    • getReconnectMaxAngleDeg

      public double getReconnectMaxAngleDeg()
    • getReconnectMaxBridgeDist

      public double getReconnectMaxBridgeDist()
    • getMeanRadius

      public double getMeanRadius()
    • getMeanIntensity

      public double getMeanIntensity()
    • getMeanContraction

      public double getMeanContraction()
    • getPathCount

      public int getPathCount()
    • getNodeCount

      public int getNodeCount()