Image mapping using the LDDMM algorithm, implemented in tensorflow. Deformable registration between well characterized atlas images and observed target images allows for labelling of anatomical parcellations to interprete data, and quantification of atrophy, growth, or shape change. Multi modality images and missing data are handled using DR IT MD, Deformable registration with intensity transform and missing data, described in https://doi.org/10.1101/494005.
This package contains functions to run deformable image registration in python, using tensorflow to handle high performance computing issues.
Below shows an illustration of deforming an atlas human MRI to match a target human MRI. The second row shows the error before and after the alignment. The decrease in error is particularly noticible in the lateral ventricle.
|Initial Error||Final Error|
Please see Example*.ipynb to see various examples. Ideally you will find one that is similar to your desired application, and you can run it on your data with minimal changes.
This package requires tensorflow running in python 3, as well as several other pythonpackages. These packages are numpy for working with arrays, matplotlib for generating figures, nibabel for reading neuroimages, ipython and jupyter for running interactive notebooks.
Below is an example of how to install this package in unix. You will need python 3.4, 3.5, or 3.6, and virtualenv. Instructions for installing these can be found on https://www.tensorflow.org/install/. You will also need git.
# set up virtual environment ENVLOCATION=~/lddmm_env ./virtualenv $ENVLOCATION # activate virtual environment source $LOCATION/bin/activate # install requirements pip3 install ipython jupyter tensorflow numpy matplotlib nibabel # clone git repo INSTALLLOCATION=~ cd $INSTALLLOCATION git clone https://github.com/dtward/image_lddmm_tensorflow.git # start jupyter notebook jupyter-notebook # jupyter will start in your web browser # navigate to one of the example files, and click on kernel->restart & run all
Other methods (including GPU) and troubleshooting for installing tensorflow can be found here https://www.tensorflow.org/install/
- (coding) Optimize for GPU.
- (application) Incorporate more example model organisms, and choose optimal parameters fo reach.