Sorry, one more thing. Add --regheader to the command lien

On 5/12/2022 5:12 PM, James Hengenius wrote:

        External Email - Use Caution

Hi Douglas,

Thanks for the suggestion! However, using mri_vol2vol generates the error message:

    ERROR: SUBJECTS_DIR undefined.


If I set SUBJECTS_DIR  to the study directory, I get the following error:

    movvol ICBM152_2009c_AtlasWhite.nii.gz
    targvol T1w_MNI.nii.gz
    outvol AtlasWhite_resampled.nii.gz
    invert 0
    tal    0
    talres 2
    regheader 0
    noresample 0
    interp  nearest (0)
    precision  float (3)
    Gdiag_no  -1
    Synth      0
    SynthSeed  1653169738
    ERROR: no registration (R) is specified

    Invalid argument
    mri_vol2vol  --targ T1w_MNI.nii.gz --interp nearest  --mov
    ICBM152_2009c_AtlasWhite.nii.gz  --o AtlasWhite_resampled.nii.gz :
    Signal 124


 Note that our participant directories aren't in the standard Freesurfer subject directory structure, if that matters. Is mri_vol2vol looking for a Freesurfer generated registration somewhere in the subject directory?

Thanks!

Jim H

On Thu, May 12, 2022 at 3:43 PM Douglas N. Greve <dgr...@mgh.harvard.edu> wrote:

    try this
    mri_vol2vol --targ T1w_MNI.nii.gz  --interp nearest --mov
    ICBM152_2009c_AtlasWhite.nii.gz   --o WhiteAtlas_resampled.nii.gz


    On 5/9/2022 11:58 AM, James Hengenius wrote:

            External Email - Use Caution

    Hello FS experts,

    I'm trying to reslice a third-party atlas into the same
    resolution as my data in MNI space.  I am using the following
    command:

    mri_convert
    --like T1w_MNI.nii.gz
    --resample_type nearest
    ICBM152_2009c_AtlasWhite.nii.gz
    WhiteAtlas_resampled.nii.gz

    Output is:

    mri_convert --like T1w_MNI.nii.gz --resample_type nearest
    ICBM152_2009c_AtlasWhite.nii.gz WhiteAtlas_resampled.nii.gz
    reading from ICBM152_2009c_AtlasWhite.nii.gz...
    TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
    i_ras = (1, 0, 0)
    j_ras = (0, 1, 0)
    k_ras = (0, 0, 1)
    INFO: transform src into the like-volume: T1w_MNI.nii.gz
    writing to WhiteAtlas_resampled.nii.gz...

    In the resulting resampled atlas, the boundaries of the ROIs
    appear to use an interpolation and not nearest neighbor (i.e.,
    they take values other than the ROI values in the atlas). Not
    sure if I can embed images - if so, see the attached for an example:

    image.png

    The output is the same whether I include the --resample_type
    nearest flag or leave it out, making me think that mri_convert is
    ignoring the flag and using the default interp option.

    This can be replicated in the relatively current version
    "freesurfer-linux-centos7_x86_64-7.1.0-20200511-813297b" as well
    as the older "$Id: recon-all,v 1.379.2.73 2013/05/12 23:15:37
    nicks Exp $" (which we keep around for old pipeline compatibility).

    Any ideas on how to fix this so the ROI interfaces take
    appropriate (nearest neighbor) values rather than interpolated
    values?

    Thanks all!

    Jim H.


    _______________________________________________
    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/1JIZT_Nfiv_O3V9Op5Rohp18FzwEzNqX9wj3wDmq3BJ0VxUxdjABcebZf1uYIt3Ykm3x4kBqIi_GgPXGGKj7_63Bh8EedMUsbYb9Eez_KBxhNIwuuImuYDR2KRT6ndOzwAh8AqcSf8esLY5ERtCzZl1cbgJmRLv5sT2uBp2GsEb0xwoLEV-jlsKLvNRpU-TYYTsotAtl_bx5qJc1fdZFGvDh7Vyq9adglfuWCEkV3z63Ld7RqTwFphZl6R_hYyUhknkNVzUpiTF7909fdWXaAS4bbBJ2qdJj1CVplEABNHWCaoUIxFVAgTYnO3UFJe53O/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/1JIZT_Nfiv_O3V9Op5Rohp18FzwEzNqX9wj3wDmq3BJ0VxUxdjABcebZf1uYIt3Ykm3x4kBqIi_GgPXGGKj7_63Bh8EedMUsbYb9Eez_KBxhNIwuuImuYDR2KRT6ndOzwAh8AqcSf8esLY5ERtCzZl1cbgJmRLv5sT2uBp2GsEb0xwoLEV-jlsKLvNRpU-TYYTsotAtl_bx5qJc1fdZFGvDh7Vyq9adglfuWCEkV3z63Ld7RqTwFphZl6R_hYyUhknkNVzUpiTF7909fdWXaAS4bbBJ2qdJj1CVplEABNHWCaoUIxFVAgTYnO3UFJe53O/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/1y2kmJO_G-NY507NWtUnosin6IDNpUoIzwBGK1AUPUr47l-NRFXPoEwFm8cx3xl1LT4uNpx-aeidDAIp6p_QX2v1hJHflaZ6ihPkTyW_Ild0nFuUGtDnYl6Yo0joERw9VJl-bukSh9fjc3WFLMRSv4LpEpRbfbR-nI-sV6tjEoCji0ctBvTzdqqQIuyhWCmRl5_cLG3Y4PFgbFmd9Bs0ZGrL6_fGXRgyruCYttTIjk7St_0Igw5CE7m82B4ODQqYuIhiYDHN5c7jUi1bARAUBX9_nrv8qRUjQ1KxOGFyTSlOrcNHZ3ieljHuDB2QGaTO2/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/1y2kmJO_G-NY507NWtUnosin6IDNpUoIzwBGK1AUPUr47l-NRFXPoEwFm8cx3xl1LT4uNpx-aeidDAIp6p_QX2v1hJHflaZ6ihPkTyW_Ild0nFuUGtDnYl6Yo0joERw9VJl-bukSh9fjc3WFLMRSv4LpEpRbfbR-nI-sV6tjEoCji0ctBvTzdqqQIuyhWCmRl5_cLG3Y4PFgbFmd9Bs0ZGrL6_fGXRgyruCYttTIjk7St_0Igw5CE7m82B4ODQqYuIhiYDHN5c7jUi1bARAUBX9_nrv8qRUjQ1KxOGFyTSlOrcNHZ3ieljHuDB2QGaTO2/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline>>
    .
    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.



--
Jim Hengenius
Post-doctoral Researcher
Rosano and Huppert Groups
Department of Epidemiology
University of Pittsburgh

My Google Calendar <http://secure-web.cisco.com/1h3estQ2AU_P-QEYQ84cp30lfumtXqCRnjkcb5J0k9twnq4bpjMhkK8j_i4U34u7hk1jsno4tjtkzESQsvWRBPRzBWpRs8a-Tt9xh55_OQ_StvS2O2hBrTOPjdmuCyv4Nz6KqXPH_rn5QWrnh6EvmzI4ceXDKAP6Ic5-yJrxS6iSfLmalnh7MWQd-Y3w9BAwxaoO_ie2ZUzjsqYgO4SPcnveof3Q6ZK8LTaXzxPEdCV3LMJyIGy_N01Yaa4dOXKtnc5Ww3jiZJICJ-uK9yGWKw36xPd85HkMo5cy1L5_YDD8o-iwXrtG3Z25bZpP5SeDQ/http%3A%2F%2Fwww.google.com%2Fcalendar%2Fembed%3Fsrc%3Djames.hengenius%40gmail.com>

_______________________________________________
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