Different FOV errors

Summary of what happened:

I’m using two DWI data with different phase encoding directions. AP, PA, but exactly the same protocol, no fieldmap.

During preprocessing, I got an error message as below.

I have checked other threads related to it, but couldn’t find a correct answer. I’m wondering if there is a solution for this.

Thank you!

Command used (and if a helper script was used, a link to the helper script or the command generated):

singularity run --cleanenv -B /mnt qsiprep-0.19.0.sif /mnt/data /mnt/derivatives participant --participant_label sub-s027 --output-resolution 1.0 --fs-license-file /home/ubuntu/license.txt



Environment (Docker, Singularity, custom installation):


Data formatted according to a validatable standard? Please provide the output of the validator:


Relevant log outputs (up to 20 lines):

   Traceback (most recent call last):
      File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 397, in run
        runtime = self._run_interface(runtime)
      File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/interfaces/nilearn.py", line 134, in _run_interface
        new_nii = concat_imgs(self.inputs.in_files, dtype=self.inputs.dtype)
      File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg_conversions.py", line 525, in concat_niimgs
        for index, (size, niimg) in enumerate(
      File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg_conversions.py", line 173, in _iter_check_niimg
        raise ValueError(
    ValueError: Field of view of image #1 is different from reference FOV.
    Reference affine:
    array([[-9.99999523e-01,  6.64567068e-08, -1.97376241e-03,
           [ 1.01625075e-04,  9.94690776e-01, -2.05817908e-01,
           [-9.81634832e-04,  1.02909006e-01,  1.98938060e+00,
           [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
    Image affine:
    array([[-9.99999523e-01, -1.72196373e-08, -1.97375729e-03,
           [ 1.27203137e-04,  9.91656065e-01, -2.57823318e-01,
           [-9.78646451e-04,  1.28911719e-01,  1.98331118e+00,
           [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
    Reference shape:
    (224, 224, 75)
    Image shape:
    (224, 224, 75, 72)

Screenshots / relevant information:

Hi @kay1 , it looks like there are different fields of view in your images. If the scanner re-shimmed between the two acquisitions then your distortion correction is going to be off. That’s why there’s a strict check here.

If you’re confident that there wasn’t a re-shimming between your acquisitions you can manually copy the affine from one of your images into the other (eg the affine from the dir-AP_dwi to the dir-PA_dwi).

Thank you! it worked!