While its not explicitly stated in the relevant documentation page, my general recommendation for handling such data is:
.mif format ubiquitously, including storage of the gradient table within the image header.
When use of some other software is required, use
mrconvert to convert to NIfTI, and export
bvals, in a single step. Once you have used that software and produced an output, convert the image(s) back to
.mif, using the
-fslgrad option to re-import the (potentially modified) diffusion gradient table.
In the situation where MRtrix3 commands are used more frequently than external commands, this is simpler to manage and less likely to lead to errors. MRtrix3 commands that require the gradient table will load it automatically from the image header, and any image manipulation that requires a corresponding modification to the gradient table in the output image will do so automatically.
Conversely, if you use MRtrix3 commands infrequently, the command-line options for importing / exporting the gradient table prevent the requirement for explicit conversion to
While any MRtrix3 command that requires a gradient table in order to operate will provide both the
-fslgrad command-line options, this should not be interpreted as advocacy for the repeated use of these options over header-based storage of the gradient table. Furthermore, any command that requires a gradient table will immediately fail if the gradient table is not present in the input image header and neither of these command-line options is specified.