Simplification Tutorial#
Simplification reduces redundant SWC geometry while preserving the main tree structure.
This page keeps the older filename for compatibility, but the current feature name in the app is Simplification.
Backend and config#
Current implementation path:
swcstudio.tools.morphology_editing.features.simplification
Current config file:
swcstudio/tools/morphology_editing/configs/simplification.json
Main parameters#
thresholds.epsilonthresholds.radius_toleranceflags.keep_tipsflags.keep_bifurcationsflags.keep_roots
Parameter guidance#
lower
epsilonkeeps more geometry detail
higher
epsilonremoves more intermediate points
lower
radius_toleranceprotects more radius-sensitive nodes
higher
radius_toleranceallows stronger decimation around radius variation
CLI usage#
Run simplification on one file:
swcstudio simplify cell.swc
Use temporary overrides for one run:
swcstudio simplify cell.swc --config-json '{"thresholds":{"epsilon":1.2,"radius_tolerance":0.35},"flags":{"keep_tips":true,"keep_bifurcations":true}}'
Current single-file behavior:
the source SWC is updated automatically
the operation is recorded in
<stem>_history.swcstudioSWC/SWC+ comment headers are preserved while
# @PROVpointers are updated
GUI usage#
In Geometry Editing -> Simplification:
open the source SWC
adjust the JSON config if needed
run simplification
review the updated morphology
save or close the document to keep the source SWC updated and record the operation in history