External Email - Use Caution        

Hi Dr. Greve,

Thanks for your reply! Attached is the recon-all.log file. 

Please let me know if more information is needed!  Thanks so much!

Best,
Tengwen



From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Douglas N. Greve <dgreve@mgh.harvard.edu>
Sent: Monday, July 29, 2024 12:26 PM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] FreeSurfer in fmriprep
 
You don't often get email from dgreve@mgh.harvard.edu. Learn why this is important
please send the recon-all.log file in the scripts folder

On 7/23/2024 2:14 PM, Tengwen Fan wrote:

        External Email - Use Caution        

Dear FreeSurfer Developers,

I hope this email finds you well!

I am using fMRIprep to do pre-processing. The fMRIprep combines methodology from AFNI, ANTs, Freesurfer, FSL, and Mindboggle to do preprocessing.

 An error was reported while running the fMRIprep. It seems that it was due to the structural data and it was about the registration by FreeSurfer. But I am new in the neuroimaging area and not very sure about what the error actually is about. 

I asked the fmriprep team in neurostars (https://neurostars.org/t/fmriprep-error-makeisotropic-warning-not-different-enough-wont-reslice/29839/5) and they are also not sure about this and recommended to ask the FreeSurfer. Although I am not sure if the FreeSurfer in fmriprep is what you also work with, I would like to ask and would really appreciate it if you could help explain what error it is. Thanks you so much!

The error is attached below. Please let me know if you have any questions or if more information is needed!


The Error is: 

Cmdline:
        mri_robust_register --satit --iscale --lta /tmp/work/fmriprep_23_2_wf/sub_WLfMRI033_wf/anat_fit_wf/surface_recon_wf/fsnative2t1w_xfm/T1_robustreg.lta --mov /out/sourcedata/freesurfer/sub-WLfMRI033/mri/T1.mgz --dst /tmp/work/fmriprep_23_2_wf/sub_WLfMRI033_wf/anat_fit_wf/anat_template_wf/denoise/mapflow/_denoise0/sub-WLfMRI033_ses-Session1_T1w_noise_corrected.nii.gz
Stdout:
        7.3.2
 
        --satit: Will iterate with different SAT to ensure outliers below wlimit!
        --iscale: Enabling intensity scaling!
        --lta: Output transform as /tmp/work/fmriprep_23_2_wf/sub_WLfMRI033_wf/anat_fit_wf/surface_recon_wf/fsnative2t1w_xfm/T1_robustreg.lta . 
        --mov: Using /out/sourcedata/freesurfer/sub-WLfMRI033/mri/T1.mgz as movable/source volume.
        --dst: Using /tmp/work/fmriprep_23_2_wf/sub_WLfMRI033_wf/anat_fit_wf/anat_template_wf/denoise/mapflow/_denoise0/sub-WLfMRI033_ses-Session1_T1w_noise_corrected.nii.gz as target volume.
 
        reading source '/out/sourcedata/freesurfer/sub-WLfMRI033/mri/T1.mgz'...
        reading target '/tmp/work/fmriprep_23_2_wf/sub_WLfMRI033_wf/anat_fit_wf/anat_template_wf/denoise/mapflow/_denoise0/sub-WLfMRI033_ses-Session1_T1w_noise_corrected.nii.gz'...
 
        Registration::setSourceAndTarget(MRI s, MRI t, keeptype = TRUE )
          Type Source : 0  Type Target : 3  ensure both FLOAT (3)
          Reordering axes in mov to better fit dst... ( -1 -3 2 )
        Determinant after swap : 1
          Mov: (0.5, 0.5, 0.5)mm  and dim (512, 512, 512)
          Dst: (0.5, 0.5, 0.5)mm  and dim (360, 512, 512)
          Asserting both images: 0.5mm isotropic 
            - reslicing Mov ...
              -- changing data type from 0 to 3 (noscale = 0)...
            - reslicing Dst ...
              -- Original : (0.5, 0.5, 0.5)mm and (360, 512, 512) voxels.
              -- Resampled: (0.5, 0.5, 0.5)mm and (512, 512, 512) voxels.
              -- Reslicing using cubic bspline 
        MRItoBSpline degree 3
            - WARNING: trg mri outside_val = 0  but suspected background: -0.00687514
                      If background is black or darkgray, ignore this. If white, pass --whitebgdst
 
 
        Registration::findSaturation 
          - computing centroids 
          - computing initial transform
            -- using translation info
          - Get Gaussian Pyramid Limits ( min size: 16 max size: -1 ) 
          - Build Gaussian Pyramid ( Limits min steps: 0 max steps: 4 ) 
          - Build Gaussian Pyramid ( Limits min steps: 0 max steps: 4 ) 
 
          - Max Resolution used: 3
            -- gpS ( 64 , 64 , 64 )
            -- gpT ( 64 , 64 , 64 )
          - running loop to estimate saturation parameter:
            -- Iteration: 1  trying sat: 16
                min sat: 0 ( -1 ), max sat: 16 ( 0.12101 ), sat diff: 16, (wlimit=0.16)
            -- Iteration: 2  trying sat: 8
                min sat: 8 ( 0.324589 ), max sat: 16 ( 0.12101 ), sat diff: 8, (wlimit=0.16)
            -- Iteration: 3  trying sat: 12
                min sat: 12 ( 0.193726 ), max sat: 16 ( 0.12101 ), sat diff: 4, (wlimit=0.16)
            -- Iteration: 4  trying sat: 14
                min sat: 12 ( 0.193726 ), max sat: 14 ( 0.15173 ), sat diff: 2, (wlimit=0.16)
            -- Iteration: 5  trying sat: 13
                min sat: 13 ( 0.17074 ), max sat: 14 ( 0.15173 ), sat diff: 1, (wlimit=0.16)
            -- Iteration: 6  trying sat: 13.5
          - final SAT: 14 ( it: 6 , weight check 0.15173 <= 0.16 )
 
 
        Registration::computeMultiresRegistration 
          - computing centroids 
          - computing initial transform
            -- using translation info
          - Get Gaussian Pyramid Limits ( min size: 16 max size: -1 ) 
          - initial transform:
        Ti = [ ...
        1.0000000000000                0                0  1.6982521922295 
                      0  1.0000000000000                0 -1.1595074345649 
                      0                0  1.0000000000000 -1.1415599519338 
                      0                0                0  1.0000000000000  ]
 
          - initial iscale:  Ii =1
 
        Resolution: 4  S( 32 32 32 )  T( 32 32 32 )
        Iteration(f): 1
            -- intensity log diff: abs(-0.85599) 
            -- diff. to prev. transform: 1.62699
        Iteration(f): 2
            -- intensity log diff: abs(-0.0720915) 
            -- diff. to prev. transform: 0.761125
        Iteration(f): 3
            -- intensity log diff: abs(-0.00194135) 
            -- diff. to prev. transform: 0.0383579
        Iteration(f): 4
            -- intensity log diff: abs(-0.00123869) 
            -- diff. to prev. transform: 0.0128975
        Iteration(f): 5
            -- intensity log diff: abs(-0.000750416)  <= 0.001  :-)
            -- diff. to prev. transform: 0.00518321  <= 0.01   :-)
 
        Resolution: 3  S( 64 64 64 )  T( 64 64 64 )
        Iteration(f): 1
            -- intensity log diff: abs(0.00702447) 
            -- diff. to prev. transform: 0.977321
        Iteration(f): 2
            -- intensity log diff: abs(9.94659e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.0258922
        Iteration(f): 3
            -- intensity log diff: abs(1.21569e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.00163623  <= 0.01   :-)
 
        Resolution: 2  S( 128 128 128 )  T( 128 128 128 )
        Iteration(f): 1
            -- intensity log diff: abs(-0.000545933)  <= 0.001  :-)
            -- diff. to prev. transform: 0.356881
        Iteration(f): 2
            -- intensity log diff: abs(-7.53945e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.0881187
        Iteration(f): 3
            -- intensity log diff: abs(-5.00529e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.0253314
        Iteration(f): 4
            -- intensity log diff: abs(-2.0764e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.00744419  <= 0.01   :-)
 
        Resolution: 1  S( 256 256 256 )  T( 256 256 256 )
        Iteration(f): 1
            -- intensity log diff: abs(0.00127177) 
            -- diff. to prev. transform: 0.268975
        Iteration(f): 2
            -- intensity log diff: abs(0.000348898)  <= 0.001  :-)
            -- diff. to prev. transform: 0.0666025
        Iteration(f): 3
            -- intensity log diff: abs(8.4156e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.016444
        Iteration(f): 4
            -- intensity log diff: abs(2.77798e-05)  <= 0.001  :-)
            -- diff. to prev. transform: 0.00492133  <= 0.01   :-)
 
        Resolution: 0  S( 512 512 512 )  T( 512 512 512 )
        Iteration(f): 1
            -- WARNING: mem usage large: 4668.08Mb mem + 6 MRI
                  Maybe use --subsample <int> 
Stderr:
        makeIsotropic WARNING: not different enough, won't reslice!
        Killed
Traceback:
        Traceback (most recent call last):
          File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 398, in run
            runtime = self._post_run_hook(runtime)
          File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/niworkflows/interfaces/freesurfer.py", line 248, in _post_run_hook
            fix_lta_length(lta_file)
          File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/niworkflows/interfaces/freesurfer.py", line 399, in fix_lta_length
            lines = Path(lta_file).read_text().splitlines(keepends=True)
          File "/opt/conda/envs/fmriprep/lib/python3.10/pathlib.py", line 1134, in read_text
            with self.open(mode='r', encoding=encoding, errors=errors) as f:
          File "/opt/conda/envs/fmriprep/lib/python3.10/pathlib.py", line 1119, in open
            return self._accessor.open(self, mode, buffering, encoding, errors,
        FileNotFoundError: [Errno 2] No such file or directory: '/tmp/work/fmriprep_23_2_wf/sub_WLfMRI033_wf/anat_fit_wf/surface_recon_wf/fsnative2t1w_xfm/T1_robustreg.lta'

Best,
Tengwen

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