Validation and Repair#

This page explains how SWC-Studio turns validation output into repair-oriented workflows.

Validation is shared across interfaces#

Validation logic lives in the shared backend and is exposed through the validation tool wrappers. The GUI, CLI, and Python API therefore use the same rule catalog, the same validation engine, and the same grouped report structure.

That shared behavior matters because it keeps these operations aligned:

  • GUI validation panels

  • swcstudio validate <file>

  • swcstudio validate <folder>

  • swcstudio check <file>

What validation produces#

A validation run produces grouped pass, warning, and fail results together with detailed findings such as:

  • failing node IDs

  • failing section IDs

  • thresholds and metrics

  • blocked prerequisite summaries when required

The canonical rule and issue details live in:

What the issue system adds on top#

The issue list used by the GUI and swcstudio check is broader than the raw validation report.

The shared issue builder can combine:

  • direct validation findings

  • blocked checks

  • suspicious radii detected from the radii-cleaning backend

  • likely wrong labels inferred by comparing current labels against the auto-labeling backend

  • a simplification suggestion

This is why the issue list is useful as a repair queue rather than only as a check summary.

Repair paths#

SWC-Studio uses several repair paths depending on the issue type.

Validation and index repair#

For structural and ordering issues:

  • run validation

  • inspect the grouped findings

  • use Index Clean when the parent-before-child ordering or ID continuity needs correction

Label repair#

For annotation problems:

  • use Manual Label Editing for targeted node changes

  • use Auto Label Editing for rule-based reassignment

  • use dendrogram subtree reassignment when a whole branch should inherit a new label

Radii repair#

For suspicious radii:

  • use Manual Radii Editing for direct node-level fixes

  • use Auto Radii Editing or radii-clean for the shared multi-pass cleaner

Geometry repair#

For topology and geometry problems:

  • move nodes or subtrees

  • reconnect or disconnect branches

  • delete nodes or subtrees

  • insert new nodes

  • simplify geometry while preserving the main tree structure