Better cc visualization - #858
Open
ClePol wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the CorpusCallosum “expert” visualization tooling by adding a standalone --values_file workflow (e.g., p-values on an fsaverage contour), improving ordering/validation in plotting, and updating documentation to better explain expected input formats.
Changes:
- Added a
--values_filemode tocc_visualization.pyto plot 1D anterior→posterior value vectors (p-value/icc/thickness) on a bundled fsaverage corpus callosum contour. - Added
CCContour.get_thickness_profile()plus stricter input validation and extended plotting options (log scaling, thresholds, configurable colormap, label overrides). - Bundled a precomputed fsaverage CC contour (
fsaverage_cc_contour.json) and updated docs/README and measure descriptions accordingly.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Tightens Sphinx argparse dependency constraint for doc builds. |
| doc/scripts/cc_visualization.rst | Expands usage docs, clarifies thickness file vs profile semantics, adds --values_file examples and figure. |
| doc/overview/modules/CC.md | Clarifies definitions/formulas for CC metrics and thickness profile description. |
| CorpusCallosum/utils/types.py | Updates TypedDict docstrings to match clarified metric definitions. |
| CorpusCallosum/shape/metrics.py | Improves calculate_cc_index docstring and citation, aligns stated defaults. |
| CorpusCallosum/shape/contour.py | Adds get_thickness_profile() and extends/validates plot_contour_colorfill() (log scale, thresholds, colormap). |
| CorpusCallosum/README.md | Links to the dedicated CC visualization documentation page. |
| CorpusCallosum/data/constants.py | Adds a constant path for the bundled fsaverage CC contour JSON. |
| CorpusCallosum/data/fsaverage_cc_template.py | Switches fsaverage contour loading to a bundled JSON-derived contour. |
| CorpusCallosum/data/fsaverage_cc_contour.json | Adds the bundled precomputed fsaverage CC contour data. |
| CorpusCallosum/cc_visualization.py | Adds --values_file entrypoint logic and new CLI options for value plotting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
|
@ClePol can you reduce the file size of the example png ? |
m-reuter
added a commit
to m-reuter/FastSurfer
that referenced
this pull request
Aug 30, 2026
… merge conflict either order
Member
Author
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change only affects the cc visualization script, that is not called in FastSurfer default workflows.
In response to a user request, I improved the "expert script" that has it's own entrpoint.
Most notably
An example command is