# Fslgrad

**URL:** https://community.mrtrix.org/t/fslgrad/1410
**Category:** Uncategorized
**Created:** [January 19, 2018, 3:45pm UTC](https://community.mrtrix.org/t/fslgrad/1410 "2018-01-19T15:45:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![uclpz](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/u/a4c791/32.png) [@uclpz](https://community.mrtrix.org/u/uclpz)
#### Post date: [January 19, 2018, 3:45pm UTC](https://community.mrtrix.org/t/fslgrad/1410/1 "2018-01-19T15:45:50Z")

</div>

Hi all,

I was wondering what the advice is for using -fslgrad in tractography pipeline in so far as its an option for multiple steps in the pipeline - e.g. in mrconvert, dwi2tensor, dwi2response ect and I wasn’t sure if there are any circumstances where you shouldn’t provide the gradient scheme where the bvecs/bvals are not co-located with the DWI data?

Should you exercise this option at each stage in the tractography pipeline whenever it is a provided option in the command?

Many thanks,  
Paul

---

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [January 21, 2018, 11:19pm UTC](https://community.mrtrix.org/t/fslgrad/1410/2 "2018-01-21T23:19:07Z")

</div>

Hi Paul,

While its not explicitly stated in the relevant [documentation page](http://mrtrix.readthedocs.io/en/latest/concepts/dw_scheme.html), my general recommendation for handling such data is:

- Use the `.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 `bvecs` / `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 `.mif`.

While any _MRtrix3_ command that requires a gradient table in order to operate will provide both the `-grad` and `-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.

Rob

---

<div class="post-metadata">

### Author: ![uclpz](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/u/a4c791/32.png) [@uclpz](https://community.mrtrix.org/u/uclpz)
#### Post date: [January 26, 2018, 2:08pm UTC](https://community.mrtrix.org/t/fslgrad/1410/3 "2018-01-26T14:08:07Z")

</div>

Hi Rob

Great thanks for that - all very helpful!

Best wishes

Paul
