Class GWDTTracerFileCmd

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 GWDTTracerFileCmd extends GWDTTracerCommonCmd
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:
  • Constructor Details

    • GWDTTracerFileCmd

      public GWDTTracerFileCmd()
  • Method Details

    • isFileMode

      protected boolean isFileMode()
      Specified by:
      isFileMode in class GWDTTracerCommonCmd
    • run

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

      protected void error(String msg)
      Overrides:
      error in class GWDTTracerCommonCmd
    • handleTracedTrees

      protected void handleTracedTrees(List<Tree> trees)
      Description copied from class: GWDTTracerCommonCmd
      Called 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:
      handleTracedTrees in class GWDTTracerCommonCmd
      Parameters:
      trees - the traced trees (guaranteed non-empty)
    • configureSecondaryScoreMap

      protected boolean configureSecondaryScoreMap(AbstractGWDTTracer<?> tracer)
      Locates a paired secondary image on disk via secondaryImageSuffix. The expected file is <inputBase><suffix>.<any-ext> in the same directory as GWDTTracerCommonCmd.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:
      configureSecondaryScoreMap in class GWDTTracerCommonCmd
      Parameters:
      tracer - the tracer being configured
      Returns:
      true to continue (score map configured, or gracefully disabled); false to abort the command