Skip to content

Add atlas-agnostic cortical-surface renderer for region-wise gradients - #2

Merged
nicfre1 merged 1 commit into
mainfrom
dev
Oct 20, 2026
Merged

nicfre1 merged 1 commit into
mainfrom
dev

Conversation

@nicfre1

@nicfre1 nicfre1 commented Oct 20, 2026

Copy link
Copy Markdown
Owner

plot_group_gradients_brain_atlas.py paints a gradient CSV on any surface using an atlas annotation (.annot or GIFTI labels) supplied by the caller, so the render is no longer limited to Desikan-Killiany on fsaverage5. Region names are matched after normalising case and hemisphere tokens, with a name-map override, a per-hemisphere matching report, and explicit errors when nothing matches or the annotation and surface meshes differ.

Checked against ENIGMA's parcel_to_surface on DK-68 (identical values on all 20484 vertices) and on Schaefer-200 with synthetic coordinate-based values. nibabel and VTK are imported lazily so the matching logic is unit tested in CI; the file readers are tested in a separate module that skips when nibabel is absent.

plot_group_gradients_brain_atlas.py paints a gradient CSV on any surface
using an atlas annotation (.annot or GIFTI labels) supplied by the caller,
so the render is no longer limited to Desikan-Killiany on fsaverage5.
Region names are matched after normalising case and hemisphere tokens, with
a name-map override, a per-hemisphere matching report, and explicit errors
when nothing matches or the annotation and surface meshes differ.

Checked against ENIGMA's parcel_to_surface on DK-68 (identical values on
all 20484 vertices) and on Schaefer-200 with synthetic coordinate-based
values. nibabel and VTK are imported lazily so the matching logic is unit
tested in CI; the file readers are tested in a separate module that skips
when nibabel is absent.
@nicfre1
nicfre1 merged commit c6ac224 into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant