Skip to content
gtaberna edited this page Dec 3, 2020 · 21 revisions
MR-TIM_logo


MR-TIM: MR-based head tissue modelling
-------------------------------------------
:: USER GUIDE ::


MR-TIM is open source MATLAB software for whole-head tissue modelling of T1-weighted structural magnetic resonance (MR) images in 12 classes:

  • brain gray matter (GM)
  • cerebellar GM
  • brain white matter (WM)
  • cerebellar WM
  • brainstem
  • cerebrospinal fluid (CSF)
  • spongy bone
  • compact bone
  • muscle
  • fat
  • eyes
  • skin

Software requirements

MR-TIM requires MATLAB 2016b (MathWorks, download here) or later versions.
It is intended as a toolbox for SPM12 software package (download here).

Installation and initialization

You can download the latest version of MR-TIM from Github (here) or from NITRC repository (here).

** !! NOTE: when downloading MR-TIM from Github, first unzip the NIFTI files in MRTIM/external/NET/template/tissues_MNI folder !! **

Unzip MRTIM folder, if needed, then open MATLAB and run install_mrtim.m. Select the SPM12 folder and MR-TIM will be automatically installed in the correct folder.
Done!

Now, you have two options to initialize MR-TIM.

  1. Directly call MR-TIM toolbox by typing mrtim in MATLAB Command Window (make sure MRTIM folder is added to the path). A dedicated window along with the SPM Batch Editor will automatically appear:

MR-TIM_toolbox

  1. Open SPM by typing spm in MATLAB Command Window (make sure SPM12 is added to the path), then click on Batch in the SPM Menu window. Once the Batch Editor is open, click on SPM -> Tools -> MRTIM -> Run. You will get the list of input files and parameters in the Batch Editor window, as in the figure above.


MR-TIM_open_batch MR-TIM_open_toolbox

Input files and parameters

The Batch Editor provides a complete description of each input and parameter, as well as default values.

  • Individual structural MR image: the individual structural MR image to be processed (.nii format)
  • Output directory: the directory where the output image(s) will be saved

Step 1: Image pre-processing

  • Resampling (mm): voxel dimension in mm (isotropic) for the resampled images
  • Smoothing FWHM (mm): full width at half maximum (FWHM) of the Gaussian smoothing kernel in mm (isotropic)
  • Bias regularisation: parameter to model bias field correction
    • no regularisation (0)
    • extremely light regularisation (0.00001)
    • very light regularisation (0.0001)
    • light regularisation (0.001)
    • medium regularisation (0.01)
    • heavy regularisation (0.1)
    • very heavy regularisation (1)
    • extremely heavy regularisation (10)
  • Bias FWHM: FWHM of Gaussian smoothness of bias
    • 30mm-150mm cutoff (step by 10mm)
    • no correction
  • Low intensity threshold (%): MR image intensities lower than this threshold are set to zero

Step 2: Tissue probability mapping

  • TPM image (12 tissues): the 4-D image with the 12 tissue probability maps (the default TPM image can be found in MRTIM/external/NET/template/tissues_MNI/eTPM12.nii)
  • MRF Parameter: strength of the Markov Random Field (MRF) cleanup procedure, run when tissue class images are written out (set to zero to disable)
  • Clean Up: routine for extracting the brain from segmented images, based on a priori tissue information
    • Don't do cleanup
    • Light Clean
    • Thorough Clean

Step 3: Tissue segmentation

  • Gap filling: maximum likelihood approach based on the TPMs, to fill gaps after preliminary segmentation
    • Yes
    • No - Note: the final segmentation could include voxels with no tissue classification
  • Single-tissue masks: saving single-tissue binary masks in output_directory/tissue_masks subfolder
    • Yes
    • No

Output files

  • anatomy_prepro.nii: pre-processed MR image, after Step 1
  • anatomy_prepro_tpm.nii: 4D image including the TPMs in individual space
  • anatomy_prepro_segment.nii: tissue classification image, with voxel values in the range 0 to 12 (optionally, label -1 if Gap filling parameter was set to No)
    • 0: background
    • 1: brain gray matter (bGM)
    • 2: cerebellar GM (cGM)
    • 3: brain white matter (bWM)
    • 4: cerebellar WM (cWM)
    • 5: brainstem
    • 6: cerebrospinal fluid (CSF)
    • 7: skull - spongiosa
    • 8: skull - compacta
    • 9: muscle
    • 10: fat
    • 11: eyes
    • 12: skin
    • -1: gap (no classification)
  • single-tissue masks: binary masks for each tissue label, saved in .nii format in output_directory/tissue_masks subfolder


MR-TIM_output

Sample anatomy_prepro_segment.nii image

Running time and disk space

Running the whole MR-TIM pipeline will require about 20 min per MR image.
About 1.5 Gb of disk space is required to save all the outputs.


MR-TIM_icon