Package sc.fiji.snt

Class CurationManager

java.lang.Object
sc.fiji.snt.CurationManager
All Implemented Interfaces:
PlausibilityMonitor.WarningListener

public class CurationManager extends Object implements PlausibilityMonitor.WarningListener
Implements the Curation Assistant pane in SNT's UI. Provides morphological plausibility feedback during tracing and editing operations.

The panel is organized into:

  • Live Monitoring Parameters configures checks that run inline during interactive tracing (fork, segment, finalization hooks).
  • On-demand Monitoring Parameters configures heavier checks that scan the full reconstruction.
  • Action buttons toggle live monitoring on/off, or trigger a full on-demand scan (which runs both parameter sets across all paths).
  • Warnings table displays current issues; double-click to navigate to the issue location.
Author:
Tiago Ferreira
See Also:
  • Constructor Details

  • Method Details

    • dispose

      public void dispose()
      Unregisters this panel from the monitor. Should be called when the panel is removed from the UI to avoid listener leaks.
    • getPanel

      public JPanel getPanel()
      Builds and returns the panel to be added as a tab in SNTUI.
    • registerCommands

      protected void registerCommands(SNTCommandFinder cmdFinder)
      Registers curation commands in the SNT Command Finder.
      Parameters:
      cmdFinder - the command finder instance
    • calibrateFromTrees

      public void calibrateFromTrees(List<Tree> trees)
      Calibrates thresholds from the given in-memory trees, enables live monitoring, runs a full scan, and switches SNTUI to the Assistant tab. Intended to be called programmatically after autotracing completes.
      Parameters:
      trees - the freshly traced trees to calibrate from
    • refreshFromMonitor

      public void refreshFromMonitor()
      Refreshes all UI controls (spinners, checkboxes, toggle) from the monitor's current state. Called after loading a preset or restoring a session.
    • warningsUpdated

      public void warningsUpdated(List<PlausibilityCheck.Warning> warnings)
      Description copied from interface: PlausibilityMonitor.WarningListener
      Called whenever the monitor's warning list is updated.
      Specified by:
      warningsUpdated in interface PlausibilityMonitor.WarningListener
      Parameters:
      warnings - the current (immutable) list of warnings
    • addWarnings

      public void addWarnings(List<PlausibilityCheck.Warning> warnings)
      Appends warnings to the table without replacing existing ones. Used by external producers that want to inject items into the warnings log alongside the ones already produced by the live/deep checks. The severity filter is re-applied automatically; entries whose severity is currently hidden are accepted into the underlying list but stay invisible until the user re-enables their severity in the toolbar.
      Parameters:
      warnings - entries to append; null or empty is ignored.
    • severityColor

      public static Color severityColor(PlausibilityCheck.Severity severity)
      Returns:
      the per-severity accent color used in the Assistant tab's table, filter menu, and severity icons.
    • getStatusSummary

      public String getStatusSummary()
      Generates a summary string for the status bar: shows the most severe warning, suitable for display in the QUERY_KEEP status text.
      Returns:
      the summary string, or null if no warnings exist