Class AutotraceFromBinaryTipsCmd

java.lang.Object
org.scijava.module.AbstractModule
org.scijava.module.DefaultMutableModule
org.scijava.command.DynamicCommand
All Implemented Interfaces:
Runnable, org.scijava.Cancelable, org.scijava.command.Command, org.scijava.Contextual, org.scijava.module.Module, org.scijava.module.MutableModule, org.scijava.plugin.SciJavaPlugin

public class AutotraceFromBinaryTipsCmd extends BinaryTracerCommonCmd
Single-cell skeleton autotracing wrapper that uses the soma ROI on the canvas (or its auto-detection) as the root and the filtered seeds from SNT's SeedOverlay as tip targets. After BinaryTracer produces the full skeleton tree, this command prunes it to keep only the paths that lie on a root-to-tip route. i.e. the smallest sub-tree connecting the soma to every reachable tip.

Binary/skeleton counterpart of AutotraceFromTipsCmd. The algorithmic mechanism differs: GWDT walks parent pointers from the Fast-Marching map, while here we operate post-hoc on the assembled skeleton tree, taking advantage of the path-level parent relationships SNT already maintains.

Tips whose nearest skeleton node falls in a different connected component than the soma (i.e. the walk-up doesn't reach the root path) are silently dropped from the output but logged to the console log

Inherits soma-ROI strategy and every binary-tracer knob from BinaryTracerCommonCmd; adds the same seed source/type filters used by AutotraceFromSeedsCmd.

Author:
Tiago Ferreira
See Also:
  • Field Details

  • Constructor Details

    • AutotraceFromBinaryTipsCmd

      public AutotraceFromBinaryTipsCmd()
  • Method Details

    • init

      protected void init()
      Initializer. Inherits image-related setup from BinaryTracerCommonCmd.initForImage() and keeps the soma-ROI inputs visible. The soma ROI (or its auto-detection) is the root for the single-cell trace.
    • run

      public void run()
      Specified by:
      run in interface org.scijava.module.MutableModule
      Specified by:
      run in interface Runnable
      Overrides:
      run in class CommonDynamicCmd
    • isFileMode

      protected boolean isFileMode()
      Description copied from class: BinaryTracerCommonCmd
      Returns whether this command operates in file mode (loading images from file paths) or in image-choice mode (selecting from open images).
      Specified by:
      isFileMode in class BinaryTracerCommonCmd
      Returns:
      true for file-based operation, false for choice-widget operation
    • runCommand

      protected void runCommand()
      Description copied from class: BinaryTracerCommonCmd
      Executes the core tracing pipeline: loads images (from file or choice widgets based on BinaryTracerCommonCmd.isFileMode()), validates inputs, runs BinaryTracer, and post-processes the resulting trees.
      Overrides:
      runCommand in class BinaryTracerCommonCmd
    • handleTracedTrees

      protected void handleTracedTrees(List<Tree> trees)
      Intercepts the trees produced by the parent's binary-tracer flow, prunes each one to keep only the paths on a root-to-tip route, and forwards the pruned result to the parent's standard tree-handling (which adds them to the Path Manager, optionally with proofreading and color assignment, per the "After tracing" choice).
      Overrides:
      handleTracedTrees in class BinaryTracerCommonCmd
      Parameters:
      trees - the traced trees (guaranteed non-null and non-empty)