# Dwi2response tax does not work and the result of dwi2response tournier is strange

**URL:** <https://community.mrtrix.org/t/dwi2response-tax-does-not-work-and-the-result-of-dwi2response-tournier-is-strange/575>\
**Category:** Uncategorized\
**Created:** [November 17, 2016, 8:20pm UTC](https://community.mrtrix.org/t/dwi2response-tax-does-not-work-and-the-result-of-dwi2response-tournier-is-strange/575 "2016-11-17T20:20:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [November 17, 2016, 11:10pm UTC](https://community.mrtrix.org/t/dwi2response-tax-does-not-work-and-the-result-of-dwi2response-tournier-is-strange/575/3 "2016-11-17T23:10:14Z")

</div>

Given the results here, as well as the presence of your [other post](https://community.mrtrix.org/t/orientations-are-wrong-in-mrview-with-post-mortem-data/570), this is almost certainly an issue with the diffusion gradient orientations. If your image axes are permuted in any way, the gradient vectors need to be correspondingly modified.

- The `tournier` algorithm gives the result it does because it relies on direct averaging of the signal in the top 300 single-fibre voxels, _after rotating those signals such that the fibre direction is along the z-axis_. So if the gradient directions are incorrect, that averaging process goes awry. But there’s a good chance that the selected voxels themselves (as shown by the `-sf_voxels` option) will in fact be appropriate.

- The `tax` algorithm relies on iteratively _rejecting_ voxels from the single-fibre selection, based on the response function estimated during the previous iteration. But if calculation of said response function from single-voxel averaging (see point above) is going awry, you end up with a bad response function, concomitantly bad FODs, and all voxels rejected from the single-fibre mask. The message isn’t quite right (it should just print ‘`Aborting: All voxels have been excluded from single-fibre selection`’, but I’ve failed to import the library function to print said message; I’ll fix that), but the point stands nonetheless.

Cheers  
Rob

---

_[View the full topic](https://community.mrtrix.org/t/dwi2response-tax-does-not-work-and-the-result-of-dwi2response-tournier-is-strange/575)._
