Skip to content

tools for working with brain lesion and anatomical ROI masks

Notifications You must be signed in to change notification settings

delikkate/ABLeR

Repository files navigation

Analysis of Brain Lesions, Revived (ABLeR)

This repo represents a collection of tools that were developed to characterize brain lesions of patients from the Vietnam Head Injury Study (VHIS) dataset (Raymont et al. 2011). It aims to replace the Analysis of Brain Lesions (ABLe) software (Solomon et al. 2007; Makale et al. 2002) that is not supported any more.

The compute_lesion_ROI_overlap.m script produces the tables containing information about the supplied binary lesion masks, including:

  • the overall lesion size (in voxels) and volume (in cm3),
  • the extent of lesion overlap with different anatomical ROIs (in voxels and cm3),
  • the percentage of a lesion falling into each anatomical ROI,
  • the percentage of each anatomical ROI impacted by a lesion.

This script automates the procedure that can be done manually in MRIcroGL, as demonstrated in this video tutorial, and allows to do it for multiple lesion masks in one batch.

The script requires the SPM12 toolbox for MATLAB to be installed. Download the spm12 folder and add it to the MATLAB path. If a Mac refuses to run Mex files called by SPM, override the Gatekeeper in the Terminal by typing the following (replace LOCATION_OF_SPM with the path where it’s stored):

sudo xattr -r -d com.apple.quarantine LOCATION_OF_SPM
sudo find LOCATION_OF_SPM -name \*.mexmaci64 -exec spctl --add {} \;

Copy and paste the anatomical atlas (both the .nii and the .xml) you want to use to spm12/atlas or spm12/tpm. A few atlases in the MNI space are provided with this code in the subfolder "MNI_atlases", including:

  • three versions of the AAL atlas for SPM:
    • AAL (2×2×2 mm voxels)
    • AAL3v1 (2×2×2 mm voxels)
    • AAL3v1_1mm (1×1×1 mm voxels)
  • version of the Brodmann atlas, copied and modified from MRIcroGL’s predecessor MRIcron. Note that numbers in ROI names in brodmann.xml need to be zero-padded, otherwise spm_atlas.m will lump all double-digit ROIs into the corresponding single-digit one (so that roi1, roi11, roi17, roi18 and roi19 will all be extracted into roi1). To find the atlases supplied with MRIcron or MRIcroGL on a Mac computer, go to Applications → right-click on the MRIcron/MRIcroGL icon to invoke the context menu → Show Package Contents
      → MRIcron: Contents/resources/templates
      → MRIcroGL: Contents/Resources/atlas

The compute_lesion_ROI_overlap.m script takes three inputs:

  1. atlas_name — file name (without the extension) of the anatomical atlas of choice, that needs to be stored in spm12/atlas or spm12/tpm
  2. lesion_folder — name of the subfolder containing the binary lesion masks
  3. voxel_volume_cm3 — voxel volume in cm3; e.g., 1-mm isotropic voxel has the volume of (1^3)/10= 0.001 cm3; 2-mm isotropic voxel has the volume of (2^3)/1000 = 0.008 cm3

Make sure that the anatomical atlas and the lesion masks are in the same space (e.g., MNI) and have the same dimensions and resolution (voxel size). To check voxel size in MRIcroGL, right-click on the atlas name in the Layers window → Show Header.



Supplementary tools:

About

tools for working with brain lesion and anatomical ROI masks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published