you can set the target label to a junk file because you won't need it.

On 4/18/2025 12:31 PM, Loïc Daumail wrote:

        External Email - Use Caution        

Hi Doug,

I see thanks! Would --srclabel and --trglabel be identical in my case?
i.e., something like this:
freesurferCommand = f'mri_label2label --srclabel {surf_label_file} --trglabel {surf_label_file} --outmask {out_mask_file} --hemi {hID} --s {participant} --regmethod surface'

Corresponding bash code: 

mri_label2label --srclabel /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/functional_surf_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.label --trglabel /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/functional_surf_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.label --outmask /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/functional_surf_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.nii.gz --hemi lh --s sub-NSxLxYKx1964 --regmethod surface


Thanks,
Best,
-Loïc

Le ven. 18 avr. 2025 à 11:47, Douglas N. Greve <dgreve@mgh.harvard.edu> a écrit :
surf2vol does not take labels as an input. Instead, use mri_label2label to convert it to a mask, then use mri_surf2vol on the mask

On 4/18/2025 11:39 AM, Loïc Daumail wrote:

        External Email - Use Caution        

Dear all,

I am trying to convert label files into volume ROI masks. 

This is my command below:

mri_surf2vol --surfval /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/functional_surf_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.label --o /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/fonctional_vol_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.nii.gz --identity sub-NSxLxYKx1964 --hemi lh --fillribbon --template /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/derivatives/freesurfer/sub-NSxLxYKx1964/mri/brain.mgz


I get this error: 


Reading surface /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/derivatives/freesurfer/sub-NSxLxYKx1964/surf/lh.white

Done reading source surface

Reading thickness /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/derivatives/freesurfer/sub-NSxLxYKx1964/surf/lh.thickness

Done

INFO: reading  /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/functional_surf_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.label as unknown

mri_read(): type = 32

error: mri_read(): code inconsistency (file type recognized but not caught)

ERROR: could not read /Users/ldaumail3/Documents/research/ampb_mt_tractometry_analysis/ampb/analysis/functional_surf_roi/sub-NSxLxYKx1964/sub-NSxLxYKx1964_hemi-L_space-fsnative_label-MT_mask.label as unknown


Any idea what would cause this? Is it because the labels weren't saved in the correct format?


Thanks,

Best,

-Loïc


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed.  If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline <MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline> .

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer