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://secure-web.cisco.com/1WboGjsp1XDsnzClB7iD0-8so4xTNqnpjNoue_C06W_MmqO... | https://secure-web.cisco.com/1WboGjsp1XDsnzClB7iD0-8so4xTNqnpjNoue_C06W_MmqO... ] ). 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
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/3498...https://secure-web.cisco.com/1WboGjsp1XDsnzClB7iD0-8so4xTNqnpjNoue_C06W_MmqOp9H2iNboqIeVdK4HOQ6FQBjtJTlzfQ5jgn2ZN6ikBcEFkhfbeLa3raH0uXOppe4Kvgxj0tm4gmPHpeFsR_mjXvDxm6frSH2eLF7C8QqadbBZQ2NWOvRYamF3GGz_8knZ3SPjfZfaOwZNC0Udp0t9wxaKAK6GPQdFF8UDjACdbCZKsqyEAZ8BN9n7fZdeIwQXv-0jqnMAeDLFAISSoKXHxI-uneEM-8hD07UeGg_nnL57XoTNpoxvEDwZ-zcnNqJuvB4znNlKwzxTLqcTmqRKxYNJ2yLy3SgRydpw9nUQ/https%3A%2F%2Ffigshare.com%2Farticles%2Fdataset%2FHCP-MMP1_0_projected_on_fsaverage%2F3498446). 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
freesurfer@nmr.mgh.harvard.edu