Package sc.fiji.snt.plugin
Class AutotraceFromBinaryTipsCmd
java.lang.Object
org.scijava.module.AbstractModule
org.scijava.module.DefaultMutableModule
org.scijava.command.DynamicCommand
sc.fiji.snt.gui.cmds.CommonDynamicCmd
sc.fiji.snt.plugin.BinaryTracerCommonCmd
sc.fiji.snt.plugin.AutotraceFromBinaryTipsCmd
- 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
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 Summary
FieldsFields inherited from class sc.fiji.snt.plugin.BinaryTracerCommonCmd
abortRun, afterTracingChoice, chosenMaskImp, connectComponents, cullSingleNodePaths, debugMode, ensureMaskImgVisibleOnAbort, headless, impMap, inputDir, lengthThreshold, loopSolvingChoice, maskImgFileBeingProcessed, maxConnectDist, originalImgChoice, pruneByLength, ROI_AUTO_DETECT, ROI_CENTROID, ROI_CENTROID_WEIGHTED, ROI_CONTAINED, ROI_EDGE, ROI_UNSET, roiPlane, rootChoiceFields inherited from class sc.fiji.snt.gui.cmds.CommonDynamicCmd
EMPTY_LABEL, HEADER_HTML, snt, sntService, statusService, ui, uiServiceFields inherited from class org.scijava.command.DynamicCommand
moduleService, pluginService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleTracedTrees(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).protected voidinit()Initializer.protected booleanReturns whether this command operates in file mode (loading images from file paths) or in image-choice mode (selecting from open images).voidrun()protected voidExecutes the core tracing pipeline: loads images (from file or choice widgets based onBinaryTracerCommonCmd.isFileMode()), validates inputs, runsBinaryTracer, and post-processes the resulting trees.Methods inherited from class sc.fiji.snt.plugin.BinaryTracerCommonCmd
assignRoiZPosition, cancel, cancel, confirmIfNotSegmented, createAndConfigureConverter, error, getRoi, getRootStrategy, info, initForFile, initForImage, isSegmented, noImgError, pruneModeToString, setPruneMode, validateBeforeTracingMethods inherited from class sc.fiji.snt.gui.cmds.CommonDynamicCmd
getPromptWithCloseHandler, getPromptWithCloseHandler, init, isCanceled, msg, notifyExternalDataLoaded, notifyLoadingEnd, notifyLoadingStart, resetUI, resetUI, resetUI, statusMethods inherited from class org.scijava.command.DynamicCommand
context, getCancelReason, getContext, getInfo, getInput, getOutput, saveInputs, setContext, setInput, setOutput, uncancelMethods inherited from class org.scijava.module.AbstractModule
getDelegateObject, getInputs, getOutputs, initialize, isInputResolved, isOutputResolved, preview, resolveInput, resolveOutput, setInputs, setOutputs, unresolveInput, unresolveOutputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.scijava.module.Module
getDelegateObject, getInputs, getOutputs, initialize, isInputResolved, isOutputResolved, isResolved, preview, resolveInput, resolveOutput, setInputs, setOutputs, setResolved, unresolveInput, unresolveOutputMethods inherited from interface org.scijava.module.MutableModule
addInput, addInput, addOutput, addOutput, removeInput, removeOutput
-
Field Details
-
SOURCE_SELECTION
- See Also:
-
-
Constructor Details
-
AutotraceFromBinaryTipsCmd
public AutotraceFromBinaryTipsCmd()
-
-
Method Details
-
init
protected void init()Initializer. Inherits image-related setup fromBinaryTracerCommonCmd.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:
runin interfaceorg.scijava.module.MutableModule- Specified by:
runin interfaceRunnable- Overrides:
runin classCommonDynamicCmd
-
isFileMode
protected boolean isFileMode()Description copied from class:BinaryTracerCommonCmdReturns whether this command operates in file mode (loading images from file paths) or in image-choice mode (selecting from open images).- Specified by:
isFileModein classBinaryTracerCommonCmd- Returns:
truefor file-based operation,falsefor choice-widget operation
-
runCommand
protected void runCommand()Description copied from class:BinaryTracerCommonCmdExecutes the core tracing pipeline: loads images (from file or choice widgets based onBinaryTracerCommonCmd.isFileMode()), validates inputs, runsBinaryTracer, and post-processes the resulting trees.- Overrides:
runCommandin classBinaryTracerCommonCmd
-
handleTracedTrees
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:
handleTracedTreesin classBinaryTracerCommonCmd- Parameters:
trees- the traced trees (guaranteed non-null and non-empty)
-