[Home] [Thesis main page] [Abstract] [Publications]


Elastic Image Registration using Parametric Deformation Models

Jan Kybic

Preliminaries

All code is available under the GNU Public License (GPL) provided you give me the appropriate credit. The GPL basically means you can use my programs for free but there is no warranty whatsoever and you may not incorporate it into a proprietary program. If you publish your work and you have used my code, you should reference either this thesis or one of our relevant papers.

This is a work in progress. The code worked for me and I am making it available in the hope that it can be useful. If you have a problem or want to share your experience with my programs, contact me. However, I cannot promise an immediate response.

Requirements

The programs have been developed on a Sun workstation and a PC running Linux. It has also been made to work with minor quirks (in the graphical interface) on a PC running Windows 95 and a MacIntosh running Mac OS X ( details here). Basically, if you have a C compiler and Python works on your platform, you should be able to get my algorithm running. The graphical output, useful but not necessary, relies on Tkinter (a Python interface to Tk) to display images and on Gnuplot to show graphs.

Installation

The current version is written in Python. Install it and make sure you get also the Tkinter extensions. Add Numerical Python and PIL (Python Imaging Library). Install Gnuplot and the Python interface Gnuplot.py. Download and untar the source code archive jkpyreg-0.2.tgz which will create and populate a directory jkpyreg-0.2. Enter, check if all the settings in the Makefile are correct, and type make to compile the C modules.

Usage

If all goes well, you should be able to run the registration by typing

python jkregister.py --difa anata.tiff --difb anatb.tiff anatref.tiff anattest.tiff 

This registers the two provided MRI images (same as on the main page). It takes typically about half a minute, depending on the speed of your machine. The script will create two new image files containing the overlay of the images before (anatb.tiff) and after (anata.tiff) the registration (same as on the main page). It can also output the warped version of the test image and the correspondence field in the form of a deformed grid. Running the jkregister script without arguments prints out the complete usage information.

Documentation

To get the most of my algorithm, you will probably want to write some Python code yourself and directly call my routines. I recommend to start by reading the jkregister.py script, followed by the file bigfelreg.py which contains the main part of the registration code. There is some documentation generated automatically from the Python source using the pydoc tool. Eventually, I will write more and put it here. And of course, you should read my thesis to understand the ideas behind the implementation.

Previous versions

I strongly recommend to use the latest, fourth generation of my registration algorithm. However, I am making the previous generations available here, as they represented different tradeoffs and might be therefore more appropriate for some applications. A word of warning: should you decide to use them, you are on your own - I am not maintaining them any longer.

The first generation, written in summer 1998 in Matlab and C was used to register the EPI images (Chapter 4 of my my thesis). The second generation added support for multidimensional deformations, still in Matlab and C, was used to register the SPECT images (Chapter 5) and in part of the ultrasound experiments. The third generation of the registration algorithm, developed in January 2001, sports Python as its glue language. Functionally, it is equivalent to the second generation, only faster. The bigregister.py file contains its core routines. There is some help on installing the software on Windows$$$, an e-mail from Ross Baker and the zip file he sent me.


[Home] [Thesis main page] [Abstract] [Publications]