See the cusacklab computing blog for various assorted tech ramblings.
The following software is open source, comes without warranty and is released according to the GPL-3.0 license.
This tool is widely used in Cambridge and elsewhere. It automates the analysis of functional and morphometric MRI data. Its strength is in providing an efficient workflow: allowing pre-built pipelines to be executed in just a few lines of code, executing them in parallel (with automatic dependency calculation), and recording which parts of an analysis have been completed so that partial analyses can be restarted.
aa version 3.01 is stable; aa version 4 is in beta.
This is a Matlab-based real-time fMRI analysis suite. It can be used for neurofeedback or more complex designs such as Dynamically Adaptive Imaging.
This is beta-release software, and will require some integration with your system. The code for this is being developed substantially and moved to a google code project.
Scanner noise cancellation
Sometimes, it is useful to be able to take verbal responses from people in the scanner. This tool is a tool to remove scanner noise from audio recordings. It requires recordings where the recording level was sufficiently low that the waveform of the scanner noise did not “clip”.
Robust phase unwrapping tool
Algorithm described in Cusack & Papadakis (2002), see below for reference. Unzip it first. You may need to compile the .mex file for your platform (typically, mex robustunwrap from matlab).
>> robustunwrap([seedx seedy seedz],phasedata,magnitudeda)
- (seedx,seedy,seedz) are voxel coordinates of the starting point for unwrapping (perhaps the middle of your image?)
- phasedata is a 3D double matrix of phase values
- magnitudedata matches phasedata in size, and provides magnitude values
robustunwrap([32 32 32],phasedata,magnitudeda)
Controlling the level of sounds in Windows
There is a separate page describing these tools.
Undistortion of EPIs with a fieldmap
This tool, written in Matlab with some compiled Matlab (.mex) components, is designed to undistort EPI images using a fieldmap. To install the code:
- Download and unzip
- You’ll need SPM, so install and run this. SPM 5 was used for testing, but SPM 8 should work fine too (please comment below if you discover otherwise!)
- Unless you’re using 64-bit Linux, you’ll need to recompile the two mex components, by typing “mex robustunwrap.cpp” and “mex nnexpand.cpp” from the Matlab prompt
- IMPORTANT: change the following parameters in fieldmap_undistort_v403 to match your EPI acquisition
Is your acquisition ant>>post (put phaseencodesign=-1) or post>>ant (phaseencodesign=1)?
This is the time it takes for a single EPI slice to be acquired. You may need to ask your physicist for this
Siemens phase images are scaled so that a range 0-4096 corresponds to 0-2*pi. Adjust this for your platform if you’re not using a Siemens machine
This is the difference (in seconds) between the two echoes you’ve used to get the fieldmap. Look it up on the console or ask your physicist.
- Run it. If you don’t provide any parameters, it will ask you to select images. These should be in Nifti (.nii) format. You’ll need four single images (fieldmap magnitude, fieldmap phase, meanepi, structural) and a set of images to be undistorted. Good luck!
If you find this tool useful, you might like to cite the following to explain what you’ve done: