# Extracting ROIs for fixel-based analysis

**URL:** https://community.mrtrix.org/t/extracting-rois-for-fixel-based-analysis/1614
**Category:** Uncategorized
**Created:** [May 7, 2018, 9:56am UTC](https://community.mrtrix.org/t/extracting-rois-for-fixel-based-analysis/1614 "2018-05-07T09:56:42Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [May 18, 2018, 1:54am UTC](https://community.mrtrix.org/t/extracting-rois-for-fixel-based-analysis/1614/2 "2018-05-18T01:54:50Z")

</div>

Hi Marlene,

The AFD values are stored as [fixel data files](http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html), and do not in isolation contain any spatial or orientation information; so a dimension mismatch between such a file and a 3D mask image is inevitable.

What you are looking for is a _fixel mask_: A fixel data file that contains a value of 1 for fixels that you want to include in your computation, and a value of 0 for fixels that you do not want to include. There are various ways that such a mask could be derived; but the obvious starting point is the `voxel2fixel` command, which will project values from a 3D voxel image into the fixels underlying each voxel. You may however wish to refine this selection further, since a voxel-based selection will include unwanted crossing-fibre fixels in your selection; admittedly the tools for doing this are still a little lacking (e.g. editing fixel ROIs within `mrview` is technically feasible), but the combination of `tck2fixel` and `mrthreshold` can be useful.

From there, it’s simply a matter of executing `mrstats` on the AFD fixel data file, providing your derived fixel mask using the `-mask` option.

Rob

---

_[View the full topic](https://community.mrtrix.org/t/extracting-rois-for-fixel-based-analysis/1614)._
