External Email - Use Caution        

Thanks,  that worked without error and the resampling looks correct. 

Jim

On Thu, May 12, 2022, 11:42 PM Douglas N. Greve <dgreve@mgh.harvard.edu> wrote:
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 <dgreve@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

_______________________________________________
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> .
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

_______________________________________________
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> .
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.