Package sc.fiji.snt.plugin
Class GWDTTracerFileCmd
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.GWDTTracerCommonCmd
sc.fiji.snt.plugin.GWDTTracerFileCmd
- 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
Non-interactive command for file-based GWDT autotracing with support for
single images or batch processing of an entire directory. Traced trees can
be exported to disk as SWC files.
When imgFileChoice points to a directory, each image is processed
independently with automatic soma detection. Failures on individual images
are logged but do not abort the batch operation.
- Author:
- Tiago Ferreira
- See Also:
-
Field Summary
Fields inherited from class sc.fiji.snt.plugin.GWDTTracerCommonCmd
abortRun, backgroundThreshold, branchTuneMaxAngle, chosenImp, debugMode, imgChoice, imgFileChoice, lengthThreshold, scoreMapFilterFields 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 booleanconfigureSecondaryScoreMap(AbstractGWDTTracer<?> tracer) Locates a paired secondary image on disk viasecondaryImageSuffix.protected voidprotected voidhandleTracedTrees(List<Tree> trees) Called after tracing completes with valid trees.protected booleanvoidrun()Methods inherited from class sc.fiji.snt.plugin.GWDTTracerCommonCmd
cancel, createAndConfigureTracer, getImgFromImgChoice, initForFile, initForImage, noValidImgError, runCommand, scoreMapFilterCallbackMethods inherited from class sc.fiji.snt.gui.cmds.CommonDynamicCmd
cancel, 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
-
Constructor Details
-
GWDTTracerFileCmd
public GWDTTracerFileCmd()
-
-
Method Details
-
isFileMode
protected boolean isFileMode()- Specified by:
isFileModein classGWDTTracerCommonCmd
-
run
public void run()- Specified by:
runin interfaceorg.scijava.module.MutableModule- Specified by:
runin interfaceRunnable- Overrides:
runin classCommonDynamicCmd
-
error
- Overrides:
errorin classGWDTTracerCommonCmd
-
handleTracedTrees
Description copied from class:GWDTTracerCommonCmdCalled after tracing completes with valid trees. The default implementation loads trees into PathAndFillManager and optionally triggers proofreading. Subclasses (e.g.,GWDTTracerFileCmd) may override to export trees to disk instead.- Overrides:
handleTracedTreesin classGWDTTracerCommonCmd- Parameters:
trees- the traced trees (guaranteed non-empty)
-
configureSecondaryScoreMap
Locates a paired secondary image on disk viasecondaryImageSuffix. The expected file is<inputBase><suffix>.<any-ext>in the same directory asGWDTTracerCommonCmd.imgFileChoice.Failures (missing file, unreadable image, dimension mismatch, exception) are logged and result in score mapping being disabled for the current input; the trace still proceeds. This keeps batch runs robust to partial coverage of secondary maps.
- Overrides:
configureSecondaryScoreMapin classGWDTTracerCommonCmd- Parameters:
tracer- the tracer being configured- Returns:
trueto continue (score map configured, or gracefully disabled);falseto abort the command
-