Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiRegistration::loadMovables: voxel size is different for EPI data during SYN SDC #255

Open
smeisler opened this issue Dec 14, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@smeisler
Copy link
Contributor

What happened?

Error during SYN SDC (node is named epi_merge). Crash is not isolated to any participant in particular, as most subjects fail (but a few make it to the end without errors; hard to find differences in these few subjects). This issue looks similar to previous reports on T1 images (#538, nipreps/fmriprep#599, nipreps/fmriprep#777).

What command did you use?

singularity run -B ${scratch},${bids_dir} $IMG ${bids_dir} ${output_dir} participant --participant_label ${subject:4} -w $scratch --fs-license-file $license --output-layout legacy --use-syn-sdc --force-syn --use-aroma --skip-bids-validation

What version of fMRIPrep are you running?

21.0.0rc2

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

FreeSurfer

Please copy and paste any relevant log output.

Node: fmriprep_wf.single_subject_MIND3002_wf.syn_preprocessing_auto_00000.epi_reference_wf.epi_merge
Working directory: /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge

Node inputs:

args = <undefined>
auto_detect_sensitivity = True
average_metric = <undefined>
environ = {'SUBJECTS_DIR': '/opt/freesurfer/subjects', 'OMP_NUM_THREADS': '1'}
fixed_timepoint = True
in_files = <undefined>
in_intensity_scales = <undefined>
initial_timepoint = 1
initial_transforms = <undefined>
intensity_scaling = True
no_iteration = True
num_threads = 1
out_file = mri_robust_template_out.mgz
outlier_sensitivity = <undefined>
scaled_intensity_outputs = <undefined>
subjects_dir = /opt/freesurfer/subjects
subsample_threshold = 200
transform_outputs = True

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py", line 264, in run
    return super(FSCommandOpenMP, self).run(**inputs)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py", line 149, in run
    return super(FSCommand, self).run(**inputs)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 428, in run
    runtime = self._run_interface(runtime)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 822, in _run_interface
    self.raise_exception(runtime)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 749, in raise_exception
    raise RuntimeError(
RuntimeError: Command:
mri_robust_template --satit --fixtp --mov /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz --inittp 1 --iscale --noit --template mri_robust_template_out.mgz --subsample 200 --lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp1.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp2.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp3.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp4.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp5.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp6.lta
Standard output:
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $

--satit: Will estimate SAT iteratively!
--fixtp: Will map everything to init TP!
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz as movable/source volume.
    Total: 6 input volumes
--inittp: Using TP 1 as target for initialization
--iscale: Enableing intensity scaling!
--noit: Will output only first template (no iterations)!
--template: Using mri_robust_template_out.mgz as template output volume.
--subsample: Will subsample if size is larger than 200 on all axes!
--lta: Will output LTA transforms
Setting iscale ...
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
Standard error:
ERROR: MultiRegistration::loadMovables: images have different voxel sizes.
  Currently not supported, maybe first make conform?
  Debug info: size(5) = 3, 3, 3.3   size(0) = 3, 3, 3.6
MultiRegistration::loadMovables: voxel size is different /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz.

Bad address
Return code: 251

Additional information / screenshots

The correct native resolution for all BOLD images are 3X3X3.6.

@smeisler
Copy link
Contributor Author

Update: It turns out that in one scan has a different voxel resolution (3X3X3.3) than the other acquisition, and the subjects who do not have that scan are the ones succeeding.

@oesteban oesteban transferred this issue from nipreps/fmriprep Dec 14, 2021
@oesteban oesteban added the bug Something isn't working label Dec 14, 2021
@oesteban
Copy link
Member

@effigies, do you know whether this is expected from mri_robust_template?

@effigies
Copy link
Member

Yes, we had to add in the conform interface for anatomicals (nipreps/fmriprep#545) to handle this. (In nipreps/fmriprep#601, we limited the up-sampling to <3x.)

@effigies
Copy link
Member

We can probably just select the highest resolution (or most numerous resolution) BOLD files and drop the others. Splitting by field strength would probably also make sense, so if we have a 7T high-res fMRI we should get a different estimated fieldmap from 3T.

@smeisler
Copy link
Contributor Author

smeisler commented Dec 14, 2021

I get the same error after adding a -t argument to limit to a single task, using the same work directory. My workaround is to create "single-subject single-task" BIDS datasets in scratch space, and passing that into fmriprep. So far appears to work.

@dmd
Copy link

dmd commented Jan 24, 2022

We're having this issue as well.

[ndas@micc func]$ grep Thick *json
sub-AS03_task-intf_bold.json:   "SliceThickness": 5,
sub-AS03_task-MSIT_bold.json:   "SliceThickness": 5,
sub-AS03_task-rest_bold.json:   "SliceThickness": 3.5,
sub-AS03_task-words_bold.json:  "SliceThickness": 5,

Is there any possible temporary workaround?

@smeisler
Copy link
Contributor Author

smeisler commented Jan 24, 2022

Hi @dmd,

I work around this by creating mini BIDS directories consisting of single subjects and single tasks, and then passing that in as the BIDS root directory. That is, these temporary files have just dataset_description.json, and a single subject folder with files from only a single task.

@dmd
Copy link

dmd commented Jan 24, 2022

Thanks, we'll try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants