Hello Mrtrixers, I have problems with preproc command. It shows me always following error message:
Error: unrecognized arguments: -pe_dir
Usage: dwipreproc [ options ] pe_dir input output
Usage: (Run dwipreproc -help for more information)
I typed following command: dwipreproc -rpe_none -fslgrad bvec.bvec bval.bval -export_grad_fsl bvec_new.bvec bval_new.bval -pe_dir AP dwi.nii dwi_preprocessed.nii
I use mrtrix3 and fsl, python are up to date.
I checked already the Forum for comparable error messages but could not get a solution.
Thank you for any kind of help.
Best
Max
It looks to me like you’re using an out-of-date MRtrix3 installation. From the 3.0_RC1 version tag, the phase-encoding direction is optionally provided as a command-line option; previously, it was a compulsory argument. This is why the script complains that it doesn’t recognise the option -pe_dir, but in the example usage, “pe_dir” is specified as the first compulsory option.
If you’ve updated MRtrix3 but are still encountering this problem, you need to make sure that all traces of the previous installation are gone, and that you’re not unwittingly invoking another version of MRtrix3 installed elsewhere on your system (use “which dwipreproc” to check).
I first tried your suggestion Antonin and it works, after that I wanted to try option 2 (Reversed phase encode b=0 pair(s)) but an error occurs again. So I guess I have to reinstall mrtrix, like you said @rsmith?
first I did it the way (merge the b0 images via mrcat) it supposed to do in the documentation. But then it said
If you are running an out-of-date MRtrix3, but referring to the online documentation (which by default refers to the most up-to-date code version), you will encounter issues due to the changes that have been made to the command-line interface to the script. For instance: If you run: “dwipreproc -help”, and compare that information with the online documentation, you should see noticeable differences in the example usage and the available command-line options. This also means that the new dedicated dwipreproctutorial page - which is designed specifically to highlight the changes from previous MRtrix3 versions to the 3.0_RC1 update - will not be applicable for your code version.
If you are able to update your MRtrix3 installation (it’s really easy), that will most likely sort out the confusion. If however you are restricted to using the existing installation, it will be necessary to rely on the command / script help pages, and/or the documentation that corresponds to the version that you are using (e.g. here is the documentation for version 0.3.15).
I’m writing to ask about the dwipreproc the -pe_dir input. (-pe_dir is needed if I don’t have the header information in the up to date MRtrix3 version)
I used the notation of i, j an k. (which I think it means 1st, 2nd and 3rd dimension of the volume, am I right?) But it takes forever to run the code. (More than 12 hours, does it mean that I miss some parameters and make it unable to converge?)