Skip to content

FIX: aparc() misses side for hemisphere-specific measures#209

Merged
jhuguetn merged 1 commit into
pyxnat:bbrcfrom
jhuguetn:aparc_fix
Feb 5, 2026
Merged

FIX: aparc() misses side for hemisphere-specific measures#209
jhuguetn merged 1 commit into
pyxnat:bbrcfrom
jhuguetn:aparc_fix

Conversation

@jhuguetn
Copy link
Copy Markdown
Contributor

@jhuguetn jhuguetn commented Feb 5, 2026

For FreeSurfer (FS) stats files, aseg.stats and ?h.aparc.stats, pyxnat (branch bbrc) includes a set of handy functions to collect the content of such text files and structure it as tables (Pandas dataframe).

Bugs found in the current pyxnat.core.derivatives.freesurfer.aparc() function logic,

  • Hemisphere-specific measures 'NumVert', 'WhiteSurfArea', and 'MeanThickness' had side column not registered when parsed as table. Making it impossible to identify the hemisphere they relate to.

  • Global brain-wide measures (volume-related copied by FS from aseg.stats into aparc.stats) 'BrainSegVol', 'BrainSegVolNotVent', 'BrainSegVolNotVentSurf', 'CortexVol', 'SupraTentorialVol', 'SupraTentorialVolNotVent' and 'eTIV' were registered twice in the aparc table, one per hemisphere. Thus, having duplicated rows with the same data content.

This PR revises the aparc() function code to fix the mentioned bugs.

@jhuguetn jhuguetn merged commit 6c8b53d into pyxnat:bbrc Feb 5, 2026
0 of 2 checks passed
@jhuguetn jhuguetn deleted the aparc_fix branch February 5, 2026 12:55
jhuguetn added a commit to jhuguetn/pyxnat that referenced this pull request Feb 6, 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.

1 participant