Image registration is one of the key enabling technologies for medical image analysis. The purpose of this repository is to provide a set of demonstrations that showcase the important roles that image registration plays in the processing and analysis of brain MRI scans.
Examples produced from this demo were included as part of Image Registration - Chapter 6 of the book Advanced Neuro MR Techniques and Applications.
This is the programming language that the demos are currently written in.
This provides the underpinning image registration tools required for the demos, including
The demos also make use of FSL's various utilities for processing NIfTI images.
This provides the tool that helps with the visualisation of geometric transformations.
There are a number of ways to download the repository to your local system.
- Command line
If you are comfortable with the command line options, you can use the following command:
git clone https://github.com/garyhuizhang/MedicalImageRegistrationDemo.git
- Matlab GUI
Matlab provides a simple GUI to download a Git respository. The documentation of this functionality is available here. I have provided a set of screenshots to illustrate the process: Step 1, Step 2, and Step 3.
After you have downloaded the repository onto your local system, there are just a few simple steps before you can run the actual demos.
- Add the Code folder to the Matlab PATH
To do this, first find the full path to this folder. For example, on my system, this is /Users/gzhang/unix/research/matlab/MedicalImageRegistrationDemo/Code
.
Next call a built-in Matlab function called addpath
with the full path, in quotation marks, as its input. On my system, the appropriate Matlab command is
addpath('/Users/gzhang/unix/research/matlab/MedicalImageRegistrationDemo/Code')
If you need help with this, please follow this visual guide or refer to Matlab's documentation.
- Set up the Matlab environment to run FSL
A number of Matlab environment variables are required to allow FSL tools to run from within Matlab. To set this up, first find the full path to the root folder of your FSL installation. For example, on my system, this is /opt/fsl
.
Next call a Matlab function we provide called setupFSL
with the full path, in quotation marks, as its input. On my system, the appropriate Matlab command is
setupFSL('/opt/fsl')
If you need help with this, please follow this visual guide.
- Set up the Matlab environment to run DTI-TK
The reason to do this is similar to FSL and the process is similar as well. First find the full path to the root directory of your DTI-TK installation. Using my system as an example again, this is /Users/gzhang/unix/tools/dtitk-2.3.3-Darwin-x86_64
.
Next call a Matlab function we provide called setupDTITK
with the full path, in quotation marks, as its input. On my system, the appropriate Matlab command is
setupDTITK('/Users/gzhang/unix/tools/dtitk-2.3.3-Darwin-x86_64')
If you need help with this, please follow this visual guide.
There are currently two demos provided: Image Fusion and Spatial Normalisation.
To run this demo, simply run the following Matlab command:
imageFusionDemo
To run this demo, simply run the following Matlab command:
spatialNormalisationDemo