Can you try the dev version? I believe we fixed the bug.
From: LE TUTOUR Tom <tom.le-tutour@ch-poitiers.fr>
Sent: Tuesday, March 10, 2026 10:49 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] mri_annotation2label on HCP-MMP1 atlas
External Email - Use Caution
Dear FreeSurfer community and developers,
I have a question regarding the mri_annotation2label command. I am working using the fsaverage projection of the HCP-MMP1 parcellation (https://figshare.com/articles/dataset/HCP-MMP1_0_projected_on_fsaverage/3498446).
I was trying to extract each label of the annotation to individual files in order to combine some labels into a custom label. I am using FreeSurfer 8.1.0. For some reason, it works fine on the right hemisphere but the left hemisphere produces nothing.
The command I ran was :
mri_annotation2label --subject fsaverage --hemi lh --outdir ./labels-left --annotation HCP-MMP1 --surface white
The output I got was :
Reading surface
/my/path/fsaverage/surf/lh.white
Loading annotations from /my/path/fsaverage/label/lh.HCP-MMP1.annot
Seg base 0
calling annotation2labelV2() ...
error: Cannot allocate memory
error: mri_annotation2label: LabelAlloc() could not allocate 0-sized vector
I am assuming one of the labels is empty and this is causing the command to fail ? How could I fix this to get labels of interest for further analyses ?
Best regards,
Tom LE TUTOUR, PhD