not sure what’s going on, but the first thing to do is verify that the version of mrview being invoked is actually the right one - you’re showing the output of mrconvert -version, try mrview -version to rule out any issues on that front. Otherwise I can’t see anything wrong with your command.
dwipreproc now expects the phase-encode direction to be provided via the -pe_dir option (see help page for details). This change was introduced in version 3.0_RC1.
The problem is indeed with your usage as @jdtournier described:
dwipreproc -rpe_none AP DTI_30_average-6_denoise.mif -pe_dir j- DTI_30_average-6_denoise_preproc.mif
Here you are providing the phase-encoding direction twice: once as the first input argument “AP”, and again using the “-pe_dir j-” option.
If we strip away the command-line options, and only show the positional arguments, this is what your invocation looks like:
dwipreproc AP DTI_30_average-6_denoise.mif DTI_30_average-6_denoise_preproc.mif
That is, you have provided three arguments:
“AP”
“DTI_30_average-6_denoise.mif”
“DTI_30_average-6_denoise_preproc.mif”
The command, however, expects two positional arguments:
Usage: dwipreproc input output
So the command thinks that “AP” is the input image, “DTI_30_average-6_denoise.mif” is the output image, and “DTI_30_average-6_denoise_preproc.mif” is … something that it doesn’t know what to do with. Unfortunately the error message is not as useful as it could be; but I can’t fix this without entirely removing the dependence of the MRtrix3 Python scripts on the argparse module and writing a command-line parser from scratch.
The misunderstanding also comes from the fact that the dwipreproc script used to require three arguments. In an earlier version, manually specifying the phase-encoding direction was not an optional parameter as it is now, but a compulsory command-line argument, which needed to appear before the path to the input file. So whatever is informing you to add “AP” to the start of the instruction is out-of-date.