FAIR: Flexible Algorithms for Image Registration

  • Version: 2009-10-26
  • News

What is it?

FAIR stands for Flexible Algorithms for Image Registration and is a collection of MATLAB files in combination with an excellent documentation.


FAIR is designed as an academic and teaching tool. It can be used to explore existing techniques or to invent new features (please let me know). Though the focus is on exploring methods, FAIR can also be used for established tasks.


Fusion of PET and CT images (click on image to see the process).


FAIR provides a folder full of examples and tutorials explaining how to use the package.


The following list presents all intermediate results and the m-file for a non-parametric multi-level image registration with an affine linear pre-registration for 2D PET-CT data using the normalized gradient field as a distance measure and elastic regularization; a Gauss-Newton scheme is used as optimizer in a matrix free setting (using multigrid for the linear solve). The time was about 10sec for 128x128 data on a standard PC including all graphics and data pre-processing.
[mfile][data][multi-level representation][PIR results level 4][NPIR results level 4][NPIR results level 5][NPIR results level 6][NPIR results level 7][final results][output]


Matlab is chosen because it allows an easy interaction with the building blocks, optimal for playing and teaching. Yes, it is eating a lot of memory, but FAIR performs surprisingly well on 3D data. If you are not yet familiar to Matlab, visit The MathWorks.


FAIR enables a solid discretize then optimize approach to a variational approach to image registration

minimize J[Y]=D[T[Y],R]+S[Y],

where T and R denotes the reference and template image, respectively, Y is the wanted transformation, D is a distance measure, and S is a regularization. For an introduction to image registration see the documentation below.

FAIR provides:

  • a continuous, variational framework
  • a coarse to fine registration
  • a discretize then optimize framework
  • analytic derivatives for building blocks

 FAIR comes with:

  • extended interpolation options including a multi-level and multi-scale framework
  • modular interpolation, included are linear and spline interpolation, ...
  • modular distance measures, including Sum of Squared Differences, Mutual Information, Normalized Gradient Fields, ...
  • modular regularization, including elastic, curvature, ...
  • parametric image registration, including rigid, affine, spline transformations, ...
  • non-parametric image registration
  • multi-level and multi-scale framework
  • solid optimization techniques, including Gauss-Newton, Trust Region, ...
  • various tutorials and examples


The package is easy and ready to use. However, newcomers to the field are referred to the following literature. Please click on the images to get more information.


FAIR is free but protected by copyright; see FAIRcopyright.m

How to get it?

Visit this cool website.


  1. Thanks to Fabian Gigengack, the joint density estimator now runs on 64bit machines: ``I had to use the -largeArrayDims option (mex -largeArrayDims rhoSplineC.cc). In addition I had to update the source code of rhoSplineC.cc to make it work on my machine (see attached files). The compiled linux and windows 64bit versions are also attached. Maybe you can benefit from it...''
  2. News for Version 2009-05-06
    the image domain can now be any rectangular region
    more and extended examples and tutorials
    more and extended optimization (Gauss, Newton, lBFGS, Trust-Region)
  3. Current FAIR Version: 2009-05-06