-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hi DeepPrep Developer,
An error occurred while I was using DeepPrep to preprocess one BIDS dataset and caused the program to terminate even with the "ignore-error" parameter on. The error information is as below:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
ERROR ~ Error executing process > 'anat_wf:anat_motioncor (sub-20544)'
Caused by:
Process anat_wf:anat_motioncor (sub-20544) terminated with an error exit status (1)
Command executed:
recon-all -sd /output/Recon -subject sub-20544 -motioncor -threads 8 -itkthreads 8 -no-isrunning
Command exit status:
1
Command output:
INFO: SUBJECTS_DIR is /output/Recon
Actual FREESURFER_HOME /opt/freesurfer
Linux eee1e3310394 6.8.0-57-generic #59~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 19 17:07:41 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
#--------------------------------------------
#@# MotionCor Fri Jul 25 09:48:43 UTC 2025
Found 2 runs
/output/Recon/sub-20544/mri/orig/001.mgz
/output/Recon/sub-20544/mri/orig/002.mgz
Checking for (invalid) multi-frame inputs...
Checking for (invalid) multi-frame inputs...
#-----------------------------------------------
/output/Recon/sub-20544
mri_robust_template --mov /output/Recon/sub-20544/mri/orig/001.mgz /output/Recon/sub-20544/mri/orig/002.mgz --average 1 --template /output/Recon/sub-20544/mri/rawavg.mgz --satit --inittp 1 --fixtp --noit --iscale --iscaleout /output/Recon/sub-20544/mri/orig/001-iscale.txt /output/Recon/sub-20544/mri/orig/002-iscale.txt --subsample 200 --lta /output/Recon/sub-20544/mri/orig/001.lta /output/Recon/sub-20544/mri/orig/002.lta
7.2.0
--mov: Using /output/Recon/sub-20544/mri/orig/001.mgz as movable/source volume.
--mov: Using /output/Recon/sub-20544/mri/orig/002.mgz as movable/source volume.
Total: 2 input volumes
--average: Using method 1 for template computation.
--template: Using /output/Recon/sub-20544/mri/rawavg.mgz as template output volume.
--satit: Will estimate SAT iteratively!
--inittp: Using TP 1 as target for initialization
--fixtp: Will map everything to init TP!
--noit: Will output only first template (no iterations)!
--iscale: Enabling intensity scaling!
--iscaleout: Will perform intensity scaling and output results
--subsample: Will subsample if size is larger than 200 on all axes!
--lta: Will output LTA transforms
Setting iscale ...
reading source '/output/Recon/sub-20544/mri/orig/001.mgz'...
converting source '/output/Recon/sub-20544/mri/orig/001.mgz' to bspline ...
MRItoBSpline degree 3
reading source '/output/Recon/sub-20544/mri/orig/002.mgz'...
converting source '/output/Recon/sub-20544/mri/orig/002.mgz' to bspline ...
MRItoBSpline degree 3
ERROR: MultiRegistration::loadMovables: images have different voxel sizes.
Currently not supported, maybe first make conform?
Debug info: size(1) = 0.9766, 0.9766, 1.20013 size(0) = 0.9375, 0.9375, 1.1999
error: No such file or directory
error: MultiRegistration::loadMovables: voxel size is different /output/Recon/sub-20544/mri/orig/002.mgz.
Linux eee1e3310394 6.8.0-57-generic #59~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 19 17:07:41 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s sub-20544 exited with ERRORS at Fri Jul 25 09:48:50 UTC 2025
For more details, see the log file /output/Recon/sub-20544/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Command error:
INFO: SUBJECTS_DIR is /output/Recon
Actual FREESURFER_HOME /opt/freesurfer
Linux eee1e3310394 6.8.0-57-generic #59~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 19 17:07:41 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
#--------------------------------------------
#@# MotionCor Fri Jul 25 09:48:43 UTC 2025
Found 2 runs
/output/Recon/sub-20544/mri/orig/001.mgz
/output/Recon/sub-20544/mri/orig/002.mgz
Checking for (invalid) multi-frame inputs...
Checking for (invalid) multi-frame inputs...
#-----------------------------------------------
/output/Recon/sub-20544
mri_robust_template --mov /output/Recon/sub-20544/mri/orig/001.mgz /output/Recon/sub-20544/mri/orig/002.mgz --average 1 --template /output/Recon/sub-20544/mri/rawavg.mgz --satit --inittp 1 --fixtp --noit --iscale --iscaleout /output/Recon/sub-20544/mri/orig/001-iscale.txt /output/Recon/sub-20544/mri/orig/002-iscale.txt --subsample 200 --lta /output/Recon/sub-20544/mri/orig/001.lta /output/Recon/sub-20544/mri/orig/002.lta
7.2.0
--mov: Using /output/Recon/sub-20544/mri/orig/001.mgz as movable/source volume.
--mov: Using /output/Recon/sub-20544/mri/orig/002.mgz as movable/source volume.
Total: 2 input volumes
--average: Using method 1 for template computation.
--template: Using /output/Recon/sub-20544/mri/rawavg.mgz as template output volume.
--satit: Will estimate SAT iteratively!
--inittp: Using TP 1 as target for initialization
--fixtp: Will map everything to init TP!
--noit: Will output only first template (no iterations)!
--iscale: Enabling intensity scaling!
--iscaleout: Will perform intensity scaling and output results
--subsample: Will subsample if size is larger than 200 on all axes!
--lta: Will output LTA transforms
Setting iscale ...
reading source '/output/Recon/sub-20544/mri/orig/001.mgz'...
converting source '/output/Recon/sub-20544/mri/orig/001.mgz' to bspline ...
MRItoBSpline degree 3
reading source '/output/Recon/sub-20544/mri/orig/002.mgz'...
converting source '/output/Recon/sub-20544/mri/orig/002.mgz' to bspline ...
MRItoBSpline degree 3
ERROR: MultiRegistration::loadMovables: images have different voxel sizes.
Currently not supported, maybe first make conform?
Debug info: size(1) = 0.9766, 0.9766, 1.20013 size(0) = 0.9375, 0.9375, 1.1999
error: No such file or directory
error: MultiRegistration::loadMovables: voxel size is different /output/Recon/sub-20544/mri/orig/002.mgz.
Linux eee1e3310394 6.8.0-57-generic #59~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 19 17:07:41 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s sub-20544 exited with ERRORS at Fri Jul 25 09:48:50 UTC 2025
For more details, see the log file /output/Recon/sub-20544/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Work dir:
/output/WorkDir/nextflow/a2/a6e46e988811edb21fa132a4e9956d
Tip: view the complete command output by changing to the process work dir and entering the command cat .command.out
-- Check '.nextflow.log' file for details
WARN: Killing running tasks (19)
[24/15ebf3] Submitted process > anat_wf:split_hemi_orig_mgz (sub-10819)
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
The ChatGPT says it's caused by
"
The core reason for this error is that the two T1w images involved in motion correction have different voxel sizes in their headers. Freesurfer's mri_robust_template requires all input images to have exactly the same voxel spacing:
Voxel size of image 1 = (0.9375, 0.9375, 1.1999)
Voxel size of image 2 = (0.9766, 0.9766, 1.20013)
Since their resolutions in the xy plane differ, MultiRegistration will refuse to load them.
"
This dataset indeed has multiple "ses-xx" folder under each "sub-xx" folder, and each "ses-xx" folder has its own "anat" and "func"., e.g.
I then tried several other public datasets; all those with this kind of structure terminated with the same issue, and those without could run smoothly.
I just wonder what the solution for this would be.
BTW, I then tried another dataset with multiple "ses-xx" folders under each "sub-xx" folder too, but only the first "ses-xx" folder has both "anat" and "func", while other "ses-xx" folders only have "func". This time DeePrep did not terminate, but it seems like a lot of them failed during one of the BOLD preprocessing steps. DeepPrep completed preprocessing with even 8 procedures left and the outputs have no BOLD .nii files.