I am trying to preprocess diffusion data using MRtrix3 following Andy’s tutorial. I am getting this error when I try to do topup eddy correction using command:
dwifslpreproc Par-8_den.mif Par-8_den_preproc.mif -nocleanup -pe_dir AP -rpe_pair -se_epi b0_pair.mif -eddy_options " --slm=linear --data_is_shelled"
I get the same error. dwifslpreproc probably still uses the old tag ‘-import_pe_table’ for mrconvert, which is renamed to ‘-import_pe_topup’ in the latest mrtrix version. Will raise the issue on github.
ya, it’s based on an older MRtrix version. like HannesAlmgren said, it is probably due to the renaming of certain commands.
I switched to older version of python and the dwifslpreproc runs now. Afterwards when I try to generate a mask, the -ants option gives this error:
antsRegistration: error while loading shared libraries: libITKIOBruker-5.3.so.1: cannot open shared object file: No such file or directory
I also encountered this error this morning after updating MRtrix to v3.0.7
After some investigation, I did find a way to get dwifslpreproc to execute with some alterations to bin/dwifslpreproc.ccp. I’ll listed I changes I made here, in case someone finds them useful. The outputs look good, but I’m not very familiar with the MRtrix code base, so I won’t make any bold claims about their correctness in case I’ve missed something
The changes
Line 512 : import_dwi_pe_table_option = ’ -import_pe_topup dwi_manual_pe_scheme.txt’
Line 829 : ‘-export_pe_eddy applytopup_config.txt applytopup_indices.txt’)
Some notes - the change to line 512 addresses ‘mrconvert: [ERROR] unknown option “-import_pe_table”’. The MRtrix reference guide for mrconvert states that import_pe_topup ‘imports a phase-encoding table intended for FSL TOPUP from file’, and the reference for mrinfo states that ‘If extracting phase encoding information to interface with FSL tools, use the -export_pe_topup or -export_pe_eddy options.’, so this seems to be the intended replacement for import_pe_table
The changes to lines 828 and 829 fixes a subsequent error that arose with mrinfo (‘mrinfo: [ERROR] Only export phase encoding table to FSL eddy format in conjunction with MGH / NIfTI format images’). Converting dwi.mif to .nii and feeding it into mrinfo did not work, as the phase encoding data was not preserved. So I dropped the use of mrinfo entirely, and had mrconvert export the phase encoding directly when it did the .nii conversion