B.T. Thomas Yeo

Recent site activity

Software‎ > ‎

Spherical Demons Code Release

Email questions/comments to ythomas at csail dot mit dot edu

*Matlab Version 1.1 and Preliminary ITK available*

Description

Spherical Demons is an algorithm that registers spherical images. It extends the Demons algorithm in Euclidean space to the sphere. We use it to perform fast diffeomorphic landmark-free surface registration of 2D closed surfaces. It assumes the 2D closed surfaces are spherically parameterized and represented as spherical images. Each point on the sphere has some features describing the geometry of the original surface. For example, in the case of cortical surfaces, the features we use are mean curvature of the inflated cortical surface, sulcal depth (average convexity) and curvature of the original cortical surface. We have shown that registration between a subject mesh and an atlas takes less than 5 mins on a Xeon 3.2GHz single processor machine, which is more than 10 times faster than the popular, freely-available FreeSurfer. Our experiments also show that Spherical Demons is at least as accurate as FreeSurfer. See papers below for more details.

We provide 5 example surfaces distributed with our code (under example_surfaces folder). They are part of the publicly available oasis dataset.

Note:  Our default smoothness settings give good sulci/gyri parcellation and Brodmann areas alignment. However, the co-registered surfaces might not "look very registered". If you want the surfaces to "look very registered", you can play around with the registration smoothness parameters reg_parms inside CoregisterSurfaces.m. The comments in the ".m" file discuss this. However, in our experience, under such non-linear situation where the registered surfaces "look very registered",  the parcellation and Brodmann  areas alignment performance suffers due to overfitting (see a discussion of this phenomenon in our other paper here).

Publications

  • B.T.T. Yeo*, M.R. Sabuncu*, T. Vercauteren, N. Ayache, B. Fischl, P. Golland. Spherical Demons: Fast Diffeomorphic Landmark-Free Surface Registration. IEEE Transactions on Medical Imaging, In Press, 2009. [pdf]
  • B.T.T. Yeo, M. Sabuncu, T. Vercauteren, N. Ayache, B. Fischl, P. Golland. Spherical Demons: Fast Surface Registration. Proceedings of the International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI), volume 5241 of LNCS, 745--753, 2008 [pdf] Runner-Up, MICCAI Young Scientist Award

Matlab Code (Latest Release)

Instructions: 

  1. Download Spherical Demons version 1.1 (SDv1.1-svn593.zip)
  2. Unzip SDv1.1-svn593.zip (In linux, type "unzip SDv1.1-svn593.zip")
  3. In matlab, type "add_all_paths" INSIDE the SDv1.1-svn593 folder. Note that you have to redo this step every time you restart matlab, unless you ask matlab to save the paths permanently. For example, in linux, you can include add_all_paths in startup.m
  4. If you have NEVER used mex do the following (if you have, go to step VI): 
    1. type "mex  -setup" in matlab
    2. On prompt by matlab, in linux, choose any of the compilers you like
    3. If prompted by matlab about whether to overwrite <prefdir>/mexopts.sh, type "y" to agree
    4. On my machine, matlab now says <some_path>/<some_opts>.sh being copied to <prefdir>/mexopts.sh. Note that <prefdir> is the directory returned by matlab function prefdir. 
  5. In matlab, type "compile_all" INSIDE the SDv1.1-svn593 folder
  6. In matlab, type "CoregisterSurfaces" INSIDE the SDv1.1-svn593/SphericalDemons/ReleaseSampleCode folder. Program will start co-registering the 5 example surfaces provided with the code.  Since each registration takes 5 minutes and we set the default at 2 rounds of registration, the whole process should take about 5min x 5 x 2 = 1 hr.
  7. There are a lot of comments in CoregisterSurfaces.m. Read them! 

Release Comments: 

  1. Difference between version 1.1 and 1.0: Code behavior the same, but compilation instructions simplified. 
  2. Currently only support registration to atlas. Does not perform pairwise registration between pairs of surfaces.
  3. Tested on Linux (Debian 64bits, 32bits, Ubuntu 32bits), Windows XP 64bits (works with Visual Studio, but NOT LCC), PowerMac G5.
  4. Comes with 5 example surfaces, under "example_surfaces" folder inside SDv1.0-svn569 folder. They are part of the publicly available oasis dataset.
  5. Assumes FreeSurfer surface format and data directory structure. Default parameter settings assume existence of FreeSurfer surface: ?h.sphere with accompanying feature vector files: ?h.inflated.H, ?h.sulc and ?h.curv.
  6. Code from other sources:
    1. Code in kd_tree code provided by Guy Shechter found on matlab central. Copyrights of those files belong to him.
    2. For convenience, we also distribute a few FreeSurfer .m files (read_surf, read_curv, read_fscolorlut, fread3). The copyrights of those files belong to FreeSurfer. 
Matlab Code (Previous Release)
  • Spherical Demons version 1.0 (SDv1.0-svn569.zip). 
    • Instructions same as version 1.1, except that before if you are in linux, in a text editor, open up <prefdir>/mexopts.sh. Search and remove all instances of "-ansi". This is because the -ansi format does not allow the use of "//" as a comment in .c files. ***Note that if the mexopts.sh file is not in your <prefdir>, it is probably because your <prefdir> has changed since the last time you use "mex  -setup". You can either rerun "mex  -setup" or try to find the mexopts.sh and move it to your current <prefdir>***
    • Release comments same as version 1.1.
C++ Code (ITK)

A preliminary version is now available. We are still in the middle of fine tuning and testing the accuracy of the ITK code, so if you need to register real data or surfaces, the matlab code is the best bet!

Acknowledgments

Support for this research is provided in part by the NAMIC (NIH NIBIB NAMIC U54-EB005149), the NAC (NIT CRR NAC P41-RR13218), the mBIRN (NIH NCRR mBIRN U24-RR021382), the NIH NINDS R01-NS051826 grant, the NSF CAREER 0642971 grant, NCRR (P41-RR14075, R01 RR16594-01A1), the NIBIB (R01 EB001550, R01EB006758), the NINDS (R01 NS052585-01) and the MIND Institute. Additional support was provided by The Autism & Dyslexia Project funded by the Ellison Medical Foundation. B.T. Thomas Yeo is funded by the A*STAR, Singapore. Short visits of B.T. Thomas Yeo and Nicholas Ayache between MIT and INRIA were partially funded by the CompuTumor associated teams funding.