White Matter Mask Generation


#1

Hi, Mrtrixers,

Is there any command that used to generatewhite matter mask based on a T1 weighted image (or based on other parcellation images) in Mrtrix?

I found it that there’re two commands associated with mask generation.

  1. dwi2mask — It is used to generate a whole brain mask from a DWI image.
  2. 5tt2gmwmi — Generate a mask image appropriate for seeding streamlines on the grey matter-white matter interface

For Mrtrix is able to create GM-WM Interface, there should have some methods to generate WM mask based on a T1 image.

Moreover, dwi2response dhollander is able to estimate of WM, GM, and CSF response functions; does not require a T1 image (or segmentation thereof). There may have some method to estimate WM mask without a T1 image.

Does anyone have ideas?

Thanks,
Chaoqing


#2

Your best bet here is to use the output of 5ttgen, and extract the 3rd volume (e.g. mrconvert -coord 3 2 5tt.mif wm.nii) - see the 5TT format documentation for details. All the other commands you mention operate from the DWI data, and so can’t be used to do what you’re asking.

Note that 5ttgen is actually a script that will invoke FSL or FreeSurfer to segment the T1 - MRtrix3 does not itself include bespoke methods for T1 segmentation.


#3

Hi, Donald,

The problem is that: [ERROR] input images do not have the same number of dimensions.

t1_mpr_ns_sag_iso_5TT_nocrop_WM_axis3_wrped.nii.gz (176x224x256)
DTI_30_average-6.nii (128 x 128 x 44 x 186)

I wonder if there is a method to resample the 3rd volume of 5TT image to 128x128x44, so that I can use it as a white matter mask?


The information of both scans is shown below in the images:

image

image

Here are my current commands:

  1. 5ttgen fsl t1_mpr_ns_sag_iso.nii.gz t1_mpr_ns_sag_iso_5TT_nocrop.mif -nocrop

  2. extract the 3rd volume (WM volume):
    mrconvert -coord 3 2 t1_mpr_ns_sag_iso_5TT_nocrop.mif t1_mpr_ns_sag_iso_5TT_nocrop_WM.nii.gz

  3. reduce 4D image to 3D image:
    mrmath t1_mpr_ns_sag_iso_5TT_nocrop_WM.nii.gz mean -axis 3
    t1_mpr_ns_sag_iso_5TT_nocrop_WM_axis3.nii.gz

  4. Register t1_mpr_ns_sag_iso_5TT_nocrop_WM_axis3.nii.gz to DTI_30_average-6.mif

Thanks,
Chaoqing


#4

extract the 3rd volume (WM volume):
mrconvert -coord 3 2 t1_mpr_ns_sag_iso_5TT_nocrop.mif t1_mpr_ns_sag_iso_5TT_nocrop_WM.nii.gz

reduce 4D image to 3D image:
mrmath t1_mpr_ns_sag_iso_5TT_nocrop_WM.nii.gz mean -axis 3 t1_mpr_ns_sag_iso_5TT_nocrop_WM_axis3.nii.gz

It’s cleaner to do this in a single step:
mrconvert -coord 3 2 -axes 0,1,2 t1_mpr_ns_sag_iso_5TT_nocrop.mif t1_mpr_ns_sag_iso_5TT_nocrop_WM.nii.gz

The problem is that: [ERROR] input images do not have the same number of dimensions.

It’s not clear what command you are actually running here that’s producing this error. But yes, while in some contexts it is not necessary for two images to be defined on the same voxel grid, in others it is. In particular if a mask is being used to affect which DWI voxels are processed and which are not, this intrinsically requires that the mask be defined on the same voxel grid as the DWIs, so that the mask provides a “1” or “0” for each voxel. This is tpically achieved using the -template option in mrtransform.