Mean values of FA overlaid by label map - ROI analysis

Hello @jdtournier ,
I hope you are doing great. I would like to calculate the mean values of the FA map overlaid by label areas of the brain.

For example, I have a FA map and label map consisting of 83 brain areas. I would like to calculate the mean values of each area.

I would like to understand how ROI-analysis and voxel-wise analysis is performed in MRtrix3.

Many Thanks,
Suren

1 Like

Unfortunately, that particular workflow remains a bit cumbersome. Maybe we should extend mrstats to facilitate working with label images…

In short, the way to get your measures is to use mrstats, probably with the -output mean option if that’s what you’re after. You can provide a mask of the ROI of interest with the -mask option – this would look like:

mrstats fa.mif -mask ROI.mif -output mean

But it sounds like you have a label image, and unfortunately mrstats won’t work with that. What you can do is extract the ROI for each label using mrcalc, and pass that mask to mrstats – and you can do that as a one-liner using pipes:

N=125  # <== label for the ROI
mrcalc labels.mif $N -eq - | mrstats fa.mif -mask - -output mean

But that only gets you one ROI. If you want to get them all in one shot, you’ll need to loop over the labels, and potentially worry about empty labels. But as a first rough cut, something like this might work:

for N in {1..125} ; do
  mrcalc labels.mif $N -eq - | mrstats fa.mif -mask - -output mean
done

Obviously, edit (potentially very heavily) as appropriate…

Thank you very much @jdtournier for your prompt response. I hope mrstats could be extended to deal with label images.

Does MRtrix3 have two samples t-test to determine statistical significance of those mean values?

Thankfully,
Suren

The vectorstats command provides the same GLM capabilities of e.g. fixelcfestats, but operates on unstructured data. So e.g. you may have 83 mean-FA values per participant, across some number of participants; it will compute the requested test statistic per region, and provide FWE control, but there will be no statistical enhancement, each region is treated as being a wholly independent observation.

1 Like