Improve masking with outside tools?

Good day MRtrix developers-

New-ish to dMRI but would consider myself an fMRI expert (IMHO), so I bring related experience to this question. For context, I’m headed towards a longitudinal fixel-based analysis.

Obviously masking matters, and despite using dwibiascorrect ants beforehand, I’m not super pleased with many of the dwi2mask outputs I’ve gotten for my (3T, multi-shell) data, especially given protocol advice like “…always err on the side of inclusion (of regions) at this stage”. Overall they’re too conservative (missing voxels).

I read in the forum that masking is a recurrent issue and that version 3.1 has tackled this admirably. Unfortunately I’ve been burned so many times using developmental versions of tools that I chose 3.0.4 for this analysis. I could if necessary upgrade but that will require many repeated steps. Assuming I can stick with 3.0.4, my question is about using outside tools to improve the masks. Can I, for example:

  • mrconvert a mean B0 to .nii.gz
  • play around with any of the half dozen {s,f}MRI processing ecosystems I know to achieve better masks
  • mrconvert them back to .mif
  • use them in subsequent fixel steps, e.g. template construction?

I suppose the crux of this question is about header info; do you foresee possibly stripped header info for the masks causing downstream issues? I don’t intend to mess with other files like that. I think mrconvert has “-set_property” which might return info to .mifs but I wanted to elicit feedback before walking across that minefield.

THANK YOU!

-Salvatore (Sam) Torrisi

Hi Sam,

Check out mri_synthseg. It is really robust, at least in my experience (and based on the discussions I’ve had with others who do DWI masking).

Hope this helps :slight_smile:

Arkiev

hey thanks Arkiev, appreciate that.
i’ve also heard good things about that one. i myself use ANTsPyNet for a lot of my DL stuff. so i guess what you’re also saying is that I shouldn’t worry too much about the header info for masks messing up downstream steps?

1 Like

No worries :slight_smile:

I don’t see any issues with stripped header information causing downstream problems, as long as the mean B0 is in the same space as the original DWI image and has an identical voxel grid. One way to ensure voxel spacing, image size and header transformation match is to use mrgrid instead of mrconvert when converting the mask to .mif format. Specifying strides tends to remove headaches when incorporating non-mrtrix3 tools in a predominantly mrtrix3 pipelines…

For example, something like this might work:
mrgrid <synthseg_mask> -template <original_DWI> -strides <original_DWI> -interp nearest <synthseg_mask.mif>

Cheers,
Arkiev

1 Like