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 <dgr...@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 
<https://secure-web.cisco.com/1WpCYYm_WtYez_u1EclgrVwSlzpDJe01Q-qxSRJJHCaLM0iIJR_77Jfyo0bj_O3bbfaoD4T3UJRNC0ci3B-TSL51z1zQSt2zm0cVBfB9eCQR8f77hHv9uTH4E4PSVI7Oku1WlAXRYHVJu6Uq9UXhAOXIqnHUa-adK6EUIciAWHs-7uEvFQYeoDCGatqWpGLhZb6UDNwRUI0ubo-NY84qxfi_uJuDY2gYk44QYvUrlkVnOQRbJBR3oRyr_YuS2Au11sFjPUrR4pHxBIUHPdT4zcNH1fmTjmJoAixEpmysYSRA8FYOo8EzZMwJmVfgagvY9Viz1UqfDCEunAes3O3wO0Q/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>

    _______________________________________________
    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
    
<https://secure-web.cisco.com/1WpCYYm_WtYez_u1EclgrVwSlzpDJe01Q-qxSRJJHCaLM0iIJR_77Jfyo0bj_O3bbfaoD4T3UJRNC0ci3B-TSL51z1zQSt2zm0cVBfB9eCQR8f77hHv9uTH4E4PSVI7Oku1WlAXRYHVJu6Uq9UXhAOXIqnHUa-adK6EUIciAWHs-7uEvFQYeoDCGatqWpGLhZb6UDNwRUI0ubo-NY84qxfi_uJuDY2gYk44QYvUrlkVnOQRbJBR3oRyr_YuS2Au11sFjPUrR4pHxBIUHPdT4zcNH1fmTjmJoAixEpmysYSRA8FYOo8EzZMwJmVfgagvY9Viz1UqfDCEunAes3O3wO0Q/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>
    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
    
<https://secure-web.cisco.com/1kP5fi20l4rf8hCuPDnNgJglp5Yvbx4AdSQtiLusAmD6p5RvAvG23qawYTNjPnnXsZB4HNYutjsBFGU2qYSRWNxXvGPRISwSrXABZG7VmNpRbJbtp0zC5ZnVgXyuSmG6wUnh7XHVCoNgW-Jk_Bj8HAckmlnMQO-KtMCmRZFfW3Xsj0IFpLb0dDLy6qWM3LkO8f-hgr5Btr6L1tS2anlBCAfGU0Rz7hRKgesU7Qi2JKS4K0PBzxxz6Bh6AD8mYCwTGbIkxvcl3gUwCylAN8GICPsmd-UNSOL-2s0sau8u8vdzG9ODsHLwMFCY96oaWWUlT/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline>
    <*MailScanner has detected a possible fraud attempt from
    "secure-web.cisco.com" claiming to be*
    https://www.massgeneralbrigham.org/complianceline
    
<https://secure-web.cisco.com/1AuIopx2WXmlNEv1eSet-v_m-GyQnTgvkl_kcMV1aUAxfsziXGdU57WtYUNf6UrrS3Qcqn80CAm-OhHGTaJDxnQ0-WrAHCpB_Lqi-rCmYsssRQ1xX0lc_sNz6ZWMCqG25ubbOUVEdA0UiH2di43SbXZqaeUySZfEgZ8LiuSZMKe6LFNkfbUHItuP2Ut__BIHnU1DLSK2h_il1UYqpaMzG_fNDsy6NEC7zIPd7d6fNSvP7RQNa4zCOt0MNE42QtqTiPF2rOCe9VZiwXZjbXTEEH90TN7Lbt1h_56ahzvWzzGdfK4NcN1Vdj7RtIiTuk3Ft/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline>>
    .


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
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 https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 

Reply via email to