Main Page

From MR Tools
Jump to: navigation, search

MediaWiki has been successfully installed.

Consult the User's Guide for information on using the wiki software.


Quick Links

| Downloads | GLM Flex Fast2 | FIVE | SurfPlot | SchemaBall | fcMRI Processing Tools | Task fMRI Processing Tools | TBR |


HAB Logo.jpg

I work for MGH at the Martinos Center in Charlestown, MA. I am a data analyst and programmer for Dr. Reisa Sperling and the Harvard Aging Brain Study (Visit the HABS website here), focusing on memory, aging and Alzheimer’s.

I do a lot of data analysis and scripting in matlab, so I decided to put together this web site to share some of my matlab scripts. Hopefully some of you out there will find some of this useful and it will save you some time and hassle.

For a more interactive forum, please join the google groups at:!forum/fmri_matlab_tools or post to the SPM list with the term "MR Tools help" in the subject line. I have a filter in place that will notify me of SPM threads with that tag in the subject line.

This wiki is replacing the website at Pages on that site will now begin redirecting to this wiki.

NOTE: Each section on this page contains a link in the section header that will take you to a page with additional information.


Aaron P. Schultz

GLM Flex

NOTE: The original GLM_Flex tool has not been updated to GLM_Flex2. The new version includes a fix that ensures that the results are always computed on a type III sums of squares.

GLM Flex is a set of second level neuroimaging analysis tools that serves as an alternative to the stock SPM8 utilities.

GLM Flex is written for MATLAB, and requires and SPM8 installation.

GLM Flex was designed to be a general purpose second level SPM tools with some additional features over what is available in SPM8:

1. GLM Flex uses partitioned error terms.
2. GLM Flex can analyze voxels with missing data.
3. GLM Flex can be used to automatically remove outliers. 
4. GLM Flex can be used to run analyses with more factors than SPM8 will allow.
5. GLM Flex can be used to run second level models on FreeSurfer surface volumes (requires a freesurfer install).

GLM Flex Fast2

GLM_Flex_Fast2 is an alternate version of GLM_Flex that focuses on processing speed and ease of model specification.

We recommend using this version of the GLM_Flex code, and are planning to make this branch the primary focus of continued development.

FIVE (Functional Image Visualization Environment)

FIVE is a MATLAB tool for viewing 3D image data. The main focus of this tool is on visualizing statistical parametric maps (SPMs) overlaid on a standard brain (i.e. the MNI-152 template), though other options for native space results are also available.

FIVE was designed to allow for quick review of SPMs with various threshold options, peak detection (via peak_nii), plotting results from specific regions/clusters/spheres/voxels, and for creating images of SPM for inclusion in papers, presentations, etc...

Follow the link above for more detailed information.


This is a handy new script that I put together for creating quick surface renderings of volumetric data. This script currently only works with data in normalized group space (MNI152 or MNI305). The function uses a static mapping from MNI space to FSaverage from Freesurfer. I've bundled in some mat file so that this will work without need an FS installation, and have set this up as both a stand-alone tool and an option from within FIVE. Follow the link for more information.


Simple Circos style plotting for MATLAB.

This script is an adaptation from two recent contributions.

fcMRI Processing Tools

This package contains my batch scripts based on SPM8 for preprocessing fMRI data for functional connectivity analysis, as well as assorted tools for making seed maps, regional homogeneity maps, hub maps, and extracting time-courses from data.

Task fMRI Processing Tools

Similar to the fcMRI preprocessing tools, this package is focused on task based fMRI. The package includes both preprocessing and first level analysis scripts, again based around SPM8.

PET Analysis Tools

Object based PET analysis pipelines are now available upon request. If you are interested, please post in the google group.

TBR (Template Based Rotation)

Template Based Rotation (TBR) is new method for creating functional connectivity maps based on prior whole brain parcellations.

The TBR papers was accepted at Neuroimage. The paper can be found here:


Information about various helpful utility functions.



The web page was down for a little while, but has been restored. Most recent package is still version 2018-03-17

For historical details please follow the link.

Getting started with Wiki editing

Personal tools