Skip to content

Conversation

@alberto-jj
Copy link
Contributor

Summary

This PR updates polygon definitions to correct ROI labeling/plotting issues in ggseg.plot_dk() and ggseg.plot_aseg().

Fixes #6 and #7.


What changed

Updated polygon files (data only; no code changes):

  • ggseg/data/dk/superiorparietal_left
  • ggseg/data/dk/superiorfrontal_left
  • ggseg/data/aseg/Left-Caudate
  • ggseg/data/aseg/Right-Caudate

Verification

I visually verified the affected ROIs using plot_dk() and plot_aseg() and compared the outputs of superiorparietal, superiorfrontal, and caudate with the R implementation of ggseg. ROIs now correspond as expected.

Minimal reproducible example

import ggseg

ggseg.plot_dk(
    {'superiorparietal_left': 1.0, 'superiorparietal_right': 1.0},
    title='superiorparietal without the superiorfrontal medial polygons'
)

ggseg.plot_dk(
    {'superiorfrontal_left': 1.0, 'superiorfrontal_right': 1.0},
    title='superiorfrontal with corrected medial polygons'
)

ggseg.plot_aseg(
    {'Right-Caudate': 1.0, 'Right-Hippocampus': 1.0},
    title='Right-Caudate & Right-Hippocampus correspond'
)

ggseg.plot_aseg(
    {'Left-Caudate': 1.0, 'Left-Hippocampus': 1.0},
    title='Left-Caudate & Left-Hippocampus correspond'
)

@alberto-jj
Copy link
Contributor Author

Hi @xgrg — quick ping in case this got buried in email (cc @sipv for visibility).

PR #9 is data-only (polygon definitions) and fixes the mislabeling shown in #6 (DK left superiorparietal/superiorfrontal) and #7 (aseg Left/Right-Caudate swap).
If everything looks ok, could you approve the pending workflow (if needed) and merge? Below are screenshots comparing R’s ggseg output with my fix-dk-aseg branch.

Also @xgrg: since you mentioned you’re not actively maintaining the repo, would you be comfortable adding me as a collaborator (merge rights) on python-ggseg? I have a small, backwards-compatible improvement to plot_dk()/plot_aseg() (subplot support + ROI highlighting/alpha map + extra colorbar options) that I’d love to contribute as a follow-up PR, and I’m happy to help with triage/maintenance going forward. If you’d rather keep it PR-only, totally fine.

image image image

@xgrg
Copy link
Collaborator

xgrg commented Jan 20, 2026

Hi @alberto-jj, sorry for the late reply. Thank you very much for this important contribution. Changes look good and were tested successfully. Merging them.

@xgrg xgrg merged commit 7e031f1 into ggseg:main Jan 20, 2026
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.

Erroneous labeling of 'superiorparietal_left' and 'superiorfrontal_left' in ggseg.plot_dk()

2 participants