The aim of this work is to present a toolbox for structure segmentation of structural MRI images. All programs were developed in MATLAB ( based on a widely used fMRI, MRI software package, SPM99, SPM2, SPM5 (Wellcome Department of Cognitive Neurology, London, UK). Other previous works have developed a similar strategy for obtaining the segmentation of individual MRI image into different anatomical structures using a standardized Atlas. Have to be mentioned the one introduced by Montreal Neurological Institute (MNI) that merges the information coming from ANIMAL (algorithm that deforms one image (nonlinear registration) to match previously labelled) and INSECT (Cerebral Tissue Classification) programs for obtaining a suitable gross cortical structure segmentation [Collins et al, 1999].
Here both, nonlinear registration and gray matter segmentation processes have been performed through SPM99, SPM2, SPM5 subroutines. Three principal elements for the labeling process are used: gray matter segmentation, normalization transform matrix (that maps voxels from individual space to standardized one) and MaxPro MNI Atlas. All three are combined to yield a good performance in segmenting gross cortical structures. The programs here can be used in general for any standardized Atlas and any MRI image modality.

Individual Brain Atlas Process:

1. The MRI image is normalized to MNI space to obtain the spatial transformation matrix.   Additionally, in this step MRI individual images are segmented in three different brain tissues: cerebral spinal fluid, gray matter and white matter.
2. Each individual gray matter voxel is labeled based on MNI anatomical atlas (constructed by manual or automatic segmentation of a group of brains) and the transformation matrix obtained in the previous step. A flowchart with the steps followed by IBASPM is shown below.

Fig.1 Flowchart showing the steps  followed by IBASPM for the  brain structures parcellation. 

Some Applications:

1. For Bayesian Model Averaging in EEG/MEG Imaging applied to individual brain anatomy. The automatic labeling is used for obtaining different anatomical models for electric/magnetic source localization using Bayesian Model Averaging. Preliminary work has been published in: Melie-García et al in Human Brain Mapping 2004 (Abstract in PDF format), Poster in MHT format. For more details about Bayesian Model Averaging in EEG/MEG Imaging see Trujillo-Barreto et al 2004 , Neuroimage.
2. Automatic volume computation of gross anatomical structures.  It can be applied to detect volumetric changes between different groups through Statistic Tests. (Normal brains  versus pathologic brains).

System Requirements:

1. The IBASPM graphical user interface (GUI) runs only under MATLAB 7.0 or higher. The non-graphical version runs under MATLAB 6.5 or higher.
2. Statistical Parametrical Mapping  Software SPM2, SPM5


To download IBASPM Toolbox with GUI  Click Here

Main Functions:

Atlasing: Main function( This file contains spm_select script from SPM5 toolbox and uigetdir script from MATLAB 7.0 ).
Auto_Labelling : Computes individual atlas.
Create_SPAMs : Constructs Statistical Probability Anatomy Maps (SPAMs). 
Create_MaxProb : Creates Maximum Probability Atlas (MaxPro) using the SPAMs previously computed.
All_Brain_Vol : Computes hole brain volume masking the brain using the segmentation files (if the segmentation files does not exist it segments).
Struct_Vol : Computes the volume for different structures based on individual Atlas previously obtained by the atlasing process.
Vols_Stats : Computes mean and standard deviation for each structure in a group of individual atlases.

To download a command line IBASPM version    Click Here

Anatomic Atlases:

Atlas116.tar.gz : AAL atlas of 116 segmented structures  (
Atlas90.tar.gz : Atlas of 90 segmented structures.
Atlas84.tar.gz : Atlas of 84 segmented structures.
Atlas71.tar.gz : Atlas of 71 segmented structures.
Atlas69.tar.gz : Atlas of 69 segmented structures.

To download all Atlases  Click Here

Note: Each *.tar.gz file contains the *.hdr, the *.img files(images files) and a *.cod file (brain structure codes).

Getting Started:


1. Download and unzip the file Ibaspm.tar.gz. All the files will be unziped inside a new folder named  “IBASPM “ folder.
2. Add this folder and the SPM2 or SPM5 directory to MATLAB search paths .
3. IBASPM will run just typing “ibaspm” in the MATLAB command window.


SPM Segmentation:
Here is performed the segmentation of the individual MRI image in three type of tissues (GM, Gray Matter Tissue; WM, White Matter Tissue and CSF, Cerebral Spinal Fluid Tissue) using the spm_segment function included in the SPM toolbox.
Automatic Labeling:
Each individual gray matter voxel is labeled based on an  anatomical atlas and the transformation matrix obtained in the normalization process.
Volume Statistic:
With all individual atlases (computed previously) are calculated some statistical measures (mean and standard deviation) for all brain structures.
Create SPAMs:
The SPAMs are created by computing a voxel by voxel average of the same structure label from a group of subjects, after transforming the Individual atlases into stereotaxic space.
SPM Visualization:
Here is used the function spm_check_reg to display any of those results previously obtained. It does not work automatically, you have to choose what images you want to display.
SPM Normalization:
In this part is perfomed the spatial normalization of the MRI images into a stereotaxic space using the function spm_normalise included in the SPM toolbox.
Here the individual atlases are created from MRI images. Here is normalized, segmented and labeled each individual MRI, regardless of the modality(ie. T1, T2...etc).
Compute Brain Volume:
In this step is performed the individual brain volume computation using segmentation files obtained in the segmentation step. If MRI images are not segmented, here is performed the segmentation process and the brain volume computation.
Create MaxProb Atlas:
This process is based on the SPAMs files. Each voxel of the MaxProb  Atlas, stores the label of the most probable structure.
This button displays this page. We hope it can be helpful.

Some Results:

In order to evaluate IBASPM toolbox performance it was used in the automatic volume computation of gross anatomical structures in 74 high resolution T1-Weighted MRI images database and compared with some results reported in previous works (Collins et al, 1998). Some automatic segmentation and labeling results for one subject are shown in the figure below Table 1 .
Table1:Average structure volumes obtained for a group of 74 male subjects compared with the results
reported in the literature (Collins et al, 1998).
IBASPM       Collins et al, 1998    
Structures Mean (cm3)  STD (cm3)   Structures Mean (cm3)  STD (cm3)
Precentral_L 9.4 1.3   Precentral_L 14.5 2.2
Precentral_R 8.9 1.2   Precentral_R 16.8 2.6
Frontal_Sup_L   10.3 1.1   Frontal_Sup_L   11.2 1.5
Frontal_Sup_R 11.5 1.4   Frontal_Sup_R 11.2 1.6
ParaHippocampal_L 4.1 0.5   ParaHippocampal_L 4.4 0.8
ParaHippocampal_R 5.2 0.6   ParaHippocampal_R 5.4 1.0
Hippocampus_L 4.2 0.6   Hippocampus_L 5.1 0.8
Hippocampus_R   3.8 0.5   Hippocampus_R   4.0 0.6


Fig.2 a,c) 3D view of human brain structures segmentation obtained using IBASPM. b) Axial view of human brain structures. d) Saggital view. e)Brain structures parcellation obtained through IBASPM toolbox for one male healthy subject. f) Axial slice with some internal structures (Insula, Thalamus, Caudate, Putamen).

Note: Rendering and visualization were performed with IMAGIC and BRAINBOW (Neuronic S.A).


Fig.3 SPAMs created for a for a group of 74 male subjects previously parcelated using  IBASPM. a) Caudates. b) Thalamus. c) Middle Temporal  Lobe. d) Amygdalas. e) Precentral girus f) Hippocampus.

Fig.4 a) Anatomical Automatic Labeling (AAL) Atlas b) Maximum Probability Atlas (MaxProb) obtained by using the SPAMs previously computed for a group of 74 subjects.


We would appreciate it if the following references would be included in any published work that uses this resource:

Alemán-Gómez Y., Melie-García L., Valdés-Hernandez. P. IBASPM: Toolbox for automatic parcellation of brain structures . Presented at the 12th Annual Meeting of the Organization for Human Brain Mapping, June 11-15, 2006, Florence, Italy. Available on CD-Rom in NeuroImage, Vol. 27, No.1.


Related references:

  • Collins D L, Holmes C, Peters T, Evans A.  Automatic 3D Model-Based Neuroanatomical  SegmentationHuman  Brain  Mapping.  Vol.3: 190-208.1995.
  • Collins D. , A. Zijdenbos, and A. Evans. Automatic Volume Estimation of Gross Cerebral Structures. 4th International Conference on Functional Mapping of the Human Brain, Montreal, June 1998. Organization for Human Brain Mapping. abstract no. 702.    
  • Collins D. L., A. P. Zijdenbos, W. F. C. Barré, and A. C. Evans, ``ANIMAL+INSECT: Inproved cortical structure segmentation,'' in Proc. of the Annual Symposium on Information Processing in Medical Imaging (A. Kuba, M. Samal, and A. Todd-Pokropek, eds.), vol. 1613 of LNCS, pp. 210-223, Springer, 1999.
  • Fischl B, Salat DH, Busa E, Albert M, Dieterich M, Haselgrove C, van der Kouwe A, Killiany R, Kennedy D, Klaveness S, Montillo A, Makris N, Rosen B, Dale AM. Whole brain segmentation: automated labeling of neuroanatomical structures in the human brain.Neuron. 2002 Jan 31;33. (3):341-55.
  • Fischl B, Van der Kouwe A, Destrieux C, Halgren E, Segonne F, Salat DH, Busa E, Seidman LJ, Goldstein J, Kennedy D, Caviness V,Makris N,       Rosen B, Dale AM.  Automatically parcellating the human cerebral cortex. Cereb Cortex. 2004 Jan; 14(1):11-22.
  •  Maldjian JA,Laurienti PJ, Kraft RA, Burdette JH. An  automated method for neuroanatomic and cytoarchitectonic atlas-based interrogation of fMRI data sets. Neuroimage. 2003 Jul;19(3):1233-9.
  • Tzourio-Mazoyer N, Landeau B, Papathanassiou D, Crivello F, Etard O, Delcroix N. Automated anatomical labelling of activations in spm using a macroscopic  anatomical parcellation of the MNI MRI single subject brain. Neuroimage 15: 273-289. 2002.
  • Mazziotta J. , Toga  A. , Evans A. , Fox P.  and Lancaster. J.   A probabilistic atlas of the human brain: theory and rationale for its  development. The International Consortium for Brain Mapping.  NeuroImage, 2(2):89-101, 1995.




Yasser Alemán-Gómez
Lester Melie-García
Pedro Valdés-Hernández
Cuban Neuroscience Center
Last Update: November 7th, 2006