Requirements:
1. UNIX based operating system
a. Digital/Compaq UNIX - the original platform, which definitely
works
b. Linux - recent work by Paul Rodriguez got things working under
Linux
c. SUN - I have tested prior versions on SUNs, but had not installed
everything. Should theoretically work as a whole..
d. OS/X - Should work but totally untested.
e. Windows - Theoretically, most of this is matlab code that will
work with MATLAB. However, all of the file name conventions are UNIX
conventions, so I am unsure if Windows would work, and it remains untested.
2. Windows based PC
To do the segmentation step requires a program called mrGray,
written and maintained by Brian Wandell at Stanford.
This step requires a PC running Windows for the segmentation, but
any cheap PC with a network connection can handle this job.
3. MATLAB version 6.0 or later, with the Image Processing, Signal
Processing, and Optimization Toolboxes
No reason it shouldn't work with 5.0, but it has only been tested
with 6.0.
All the toolboxes are necessary for the unfolding algorithm.
4. A lot of patience, fortitude, UNIX, and MATLAB skill.
Installation:
I am providing sample data. I recommend getting everything to work
with the sample data first, and then trying to get your own data to work.
PC Stuff (Segmentation Program)
Go to http://white.stanford.edu/~brian/mri/segmentUnfold.htm,
and download mrGray to your PC. Use this program for segmentation. You will
need to FTP all of your segmentation files between your PC and UNIX station
(unless you can get all the matlab stuff to work on your PC).
Unix Stuff (Everything Else)
1. Download
A.Everything from the sourceforge website: http://sourceforge.net/projects/mtl-unfolding/
Gunzip and untar everything: there should be 5 tar files
1) HFM Main Module - All the MTL interface code I have written
2) Stanford's Unfolding Code - The original core unfolding algorithm
3) Stanford's mrLoadRet Module - The original MATLAB visualization routine
4) ImageUtilities - 1) an AIR script I have written, 2) epi2analyze -
converts ANMR fMRI data to analyze, and 3) imconvert - converts analyze
to .bshort, a format that HFM loads easily.
5) ExampleData
B. Automated Image Registration
- good for motion correction. I recommend installing and compiling it and
using it on my sample data. However, I am also supplying the motion corrected
data, so if you have other motion correction tools, you need not install
AIR.
C. imconvert - To get this working you need to download and install
the UCLA
image processing library as well as the imconvert
source to compile the program imconvert. I have provided the bare minimum
source in the tar files above, however, the newest versions will be at the
above two websites. You can see the help for imconvert at http://airto.loni.ucla.edu/BMCweb/HowTo/imconvert.html.
2. Compile stuff for your system - I left the executables for DECs
just in case someone out there is lucky. Otherwise, you will need to compile
things. I strongly recommend using gcc
for compiling everything.
A. Compile AIR and imconvert, as my programs use these for motion
correcting and importing the sample data.
B. Compile the mrUnfold3.0 mex files:
First, compile pqueue.c and cityheap.c using the make command
Then, to make the mex files, follow the instructions in the file HFM-mrUnfold-3.0-Matlab6/mexMatlab6/README.
Finally, copy/link the output files one directory tree higher
% make pqueue.o
% make cityheap.o
% matlab6 -nojvm (I don't like the slow java interface)
>> mex -setup (choose the gcc option)
>> mex -v mrManDist2.c pqueue.o
>> mex -v mrManifoldDistance.c cityheap.o
>> mex -v myCinterp3.c
>> exit
% cd ..
% ln -sf mexMatlab6/mrManDist.mexaxp mrManDist.mexaxp
3. Setting up paths
A. Add the directories for the AIR script, the air binaries (e.g.
alignlinear, reslice, etc.) and imconvert binaries to your .cshrc path, or
copy the binaries to your /usr/users/bin directory
B. Create the directory /usr/local/mri and /usr/local/mri/anatomy.
You will be storing all of your unfolded hemispheres (or links) in this
directory. Often, creating this directory requires root permissions.
cd /usr/local
mkdir mri
mkdir mri/anatomy
C. Create a directory in your home directory called matlab, ie ~/matlab,
or /usr/users/yourname/matlab. In that directory, place a link to the file
HFM-Code/startup_HFM_Matlab6.m
cd ~
mkdir matlab
cd matlab
ln -sf /data/HFM-Code/startup_HFM_Matlab6.m startup.m
4. Sample data
I have provided both raw data and the fully processed output on one
run with a subject in a face-name learning paradigm.
Probably it is best to
A. First try just running the HFM module with the already processed
data.
% cd loadret
% matlab -nojvm
>> HFM
Then just play around
Click on the L or R button to view the L or R flat maps
While in flat view, click View -> Phase Map to view an activity map.
Hit HFM->ColorPh to apply a cool colorscale to it!
Hit HFM->Demarcation. It will load up another figure.
Then load the demarcation file roi1. Finally hit Fit ROIs ... this will
overlay the ROIs on the activation map.
B. Try doing the whole process on the raw data.
Start from step 1!
Back to main