Skip to content

thomasyu888/mindboggle

 
 

Repository files navigation

Software -- NOTE: MINDBOGGLE IS STILL IN PRE-RELEASE AND IS UNDERGOING CHANGES

_Introduction and help

The Mindboggle software package automates shape analysis of anatomical labels and features extracted from human brain MR image data (read the story). Mindboggle can be run as a single command, and can be easily installed as a cross-platform virtual machine for convenience and reproducibility of results. Behind the scenes, open source Python and C++ code run within a Nipype pipeline framework.

_Set up Mindboggle

If running Mindboggle in a virtual machine (recommended), type the following two commands in a terminal window, in the same directory as the Vagrantfile you generated (see INSTALL). This will launch and log into the Mindboggle virtual machine (requires an active Internet connection):

vagrant up
vagrant ssh

_Example Mindboggle commands

Example 1: The following bare-bones command runs Mindboggle (and its dependencies) on data processed by FreeSurfer but not ANTs (replace SUBJECT with the name of a FreeSurfer subject directory, such as bert):

mindboggle SUBJECT

Example 2: To generate only volume data (no surface labels or measures), this command uses ANTs output files (replace SEGMENTS with an ANTs segmented file, such as ants_output/subject1/antsBrainSegmentation.nii.gz):

mindboggle SUBJECT --ants SEGMENTS --no_surfaces

Example 3: To compute all shape measures on all labels and features using 8 processors (type mindboggle --help for more options):

mindboggle SUBJECT --ants SEGMENTS --all -p 8

_FreeSurfer and ANTs preprocessing

Mindboggle currently takes output from FreeSurfer (preferably v5.3 and above) and the latest ANTs software packages.

FreeSurfer generates labeled cortical surfaces, and labeled cortical and noncortical volumes. Run recon-all on a T1-weighted IMAGE file (e.g., subject1.nii.gz) and set the output SUBJECT name (e.g., to subject1), while calling the DKT40 cortical surface atlas to aid in cortical labeling:

recon-all -all -i IMAGE -s SUBJECT -gcs DKTatlas40.gcs

ANTs provides brain volume extraction, segmentation, and registration-based labeling. To generate the ANTs transforms and segmentation files used by Mindboggle, run the antsCorticalThickness.sh script on the same IMAGE file, set an output PREFIX, and provide paths to the OASIS-30 Atropos template files (backslash denotes a line return):: antsCorticalThickness.sh -d 3 -a IMAGE -o PREFIX -e OASIS-30_Atropos_template/T_template0.nii.gz -t OASIS-30_Atropos_template/T_template0_BrainCerebellum.nii.gz -m OASIS-30_Atropos_template/T_template0_BrainCerebellumProbabilityMask.nii.gz -f OASIS-30_Atropos_template/T_template0_BrainCerebellumExtractionMask.nii.gz -p OASIS-30_Atropos_template/Priors2/priors%d.nii.gz

_Mindboggle processing steps

  1. Create hybrid gray/white segmentation from FreeSurfer and ANTs output (combine_2labels_in_2volumes).
  2. Fill hybrid segmentation with FreeSurfer- or ANTs-registered labels.
  3. Compute volume shape measures for each labeled region:

  4. Compute surface shape measures for every cortical mesh vertex:

  5. Extract cortical surface features:

  6. For each cortical surface label/sulcus, compute:

  7. Compute statistics (stats_per_label in compute.py) for each shape measure in #4 for each label/feature:

    • median
    • median absolute deviation
    • mean
    • standard deviation
    • skew
    • kurtosis
    • lower quartile
    • upper quartile

_Mindboggle output files

Example output data can be downloaded from here. By default, output files are saved in HOME/mindboggled/SUBJECT, where HOME is the home directory and SUBJECT is the name of the subject. Volume files are in Nifti format, surface meshes in VTK format, and tables are comma-delimited. Each file contains integers that correspond to anatomical labels or features (e.g., 0-24 for sulci). All output data are in the original subject's space. The following include outputs from most, but not all, optional arguments.

Folder

Contents Format

labels/

number-labeled surfaces and volumes

.vtk, .nii.gz

features/

surfaces with features: sulci, fundi

.vtk

shapes/

surfaces with shape measures (per vertex)

.vtk

tables/

tables of shape measures (per label/feature/vertex) .csv

mindboggled / SUBJECT /

labels /

FreeSurfer_wmparc_filled_labels.nii.gz: hybrid segmentation filled with FS labels

ANTs_filled_labels.nii.gz: hybrid segmentation filled with ANTs + FS cerebellar labels

[left,right]_surface / FreeSurfer_cortex_labels.vtk: FS or DKT cortical surface labels

features / [left,right]_surface /

sulci.vtk: sulci defined by DKT label pairs in depth-based folds

fundus_per_sulcus.vtk: fundus curve per sulcus -- UNDER EVALUATION --

shapes / [left,right]_surface /

area.vtk: per-vertex surface area

mean_curvature.vtk: per-vertex mean curvature

geodesic_depth.vtk: per-vertex geodesic depth

travel_depth.vtk: per-vertex travel depth

FreeSurfer_convexity.vtk: FS sulc files converted to VTK

FreeSurfer_thickness.vtk: FS thickness files converted to VTK

tables /

volumes_FreeSurfer_labels.csv: volume per FS-filled label

volumes_ANTs_labels.csv: volume per ANTs-filled label

thickinthehead_FreeSurfer_labels.csv: thickness measure per FS-filled cortical label

thickinthehead_ANTs_labels.csv: thickness measure per ANTs-filled cortical label

[left,right]_surface /

label_shapes.csv: per-label surface shape statistics

sulcus_shapes.csv: per-sulcus surface shape statistics

fundus_shapes.csv: per-fundus surface shape statistics -- UNDER EVALUATION --

vertices.csv: per-vertex surface shape statistics

About

Automated anatomical brain label/shape analysis software (+ website)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 86.5%
  • C++ 12.6%
  • Other 0.9%