Eddyqc Failure: Please use the ``img.affine`` property instead

Hi all,

I am preprocessing multi-shell data (13 b0, 8 b300, 32 b700, 64 b2000; pe-dir = ap) with one rpe b0. The dwifslpreproc command:
dwifslpreproc dwi_den_unringed.mif dwi_preproc.mif -pe_dir AP -rpe_pair -se_epi b0_pair.mif -readout_time 0.0851 -align_seepi -eddy_options " --slm=linear --mporder=# --data_is_shelled" -nthreads 15 -force -nocleanup
runs smoothly with satisfactory results, however, adding eddyqc_all eddyqc results in a warning about eddyqc, without performing it. The output of the eddy_quad_failure_output.txt is:

found b-shell of 13 orientations with b-value 5.000000
found b-shell of 32 orientations with b-value 700.000000
found b-shell of 64 orientations with b-value 2000.000000
found b-shell of 8 orientations with b-value 300.000000
Traceback (most recent call last):
  File "/usr/local/fsl/fslpython/envs/fslpython/bin/eddy_quad", line 54, in <module>
    main(args.eddyBase, args.eddyIdx, args.eddyParams, args.mask, args.bvals, args.bvecs, args.output_dir, args.field, args.slspec, args.verbose)
  File "/usr/local/fsl/fslpython/envs/fslpython/lib/python3.8/site-packages/eddy_qc/QUAD/quad.py", line 369, in main
    quad_susc.main(pp, data, eddyOutput)
  File "/usr/local/fsl/fslpython/envs/fslpython/lib/python3.8/site-packages/eddy_qc/QUAD/quad_susc.py", line 40, in main
    vol = nib.Nifti1Image(np.mean(data['eddy_epi'].get_data()[..., idxs_b0_pe[0]], axis=3), data['eddy_epi'].get_affine(), data['eddy_epi'].header)
  File "/usr/local/fsl/fslpython/envs/fslpython/lib/python3.8/site-packages/nibabel/deprecator.py", line 181, in deprecated_func
    raise error_class(message)
nibabel.deprecator.ExpiredDeprecationError: get_affine method is deprecated.
Please use the ``img.affine`` property instead.

* deprecated from version: 2.1
* Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 4.0

Of note, I have FSL 6.0.6. Looking forward to your comments.

Best,
Amir

1 Like

Hi Amir!

I just encountered the same problem - I was wondering if you found any solution?

Best,
Paulina

Hi Paulina,

I tried earlier FSL versions (I think FSL 6.0.4 to be exact) and the problem was gone.

Best,
Amir