Diffusion MRI reconstruction Project
By Erjun Zhang, & Brainhack School 2020
Published on May 16, 2020
| Last updated on
June 26, 2024
Project definition
Background
Low blood sugar is a common problem in both children and adults. Existing research showed that it may lead to serious both transient and permanent structural abnormalities on brains. Magnetic resonance imaging (MRI), specially diffusion MRI, has a higher in vivo sensitivity to lesions in soft tissues compared to other imaging modalities, and has potential to identify and quantify brain structure changes. Some of these changes are not appraient enough,even for experienced experts. Machine learning is a useful method to discover potential features.
Currently, there are some open-source software to reconstruct and analyze diffusion MRI data. However, only using these tools, one, like me as a new student in this field, may get confused about operations and principle behind them. This seriously stops people to reach their long-term goals in their diffusion MRI project.
Thus, I began this project to preprocess dMRI data, reconstruct diffusion MR images and do some analysis by using machine learning. The goals are as following:
- Get preprocessed diffusion MR images from raw data;
- Reconstruct diffusion tensor images from the preprocessed data;
- By using machine learning, try to classify two hemispherical brains from preprocessed diffusion images.
Tools
The “Diffusion MRI reconstruction project” will rely on the following tools:
- Python3: coding language used to complete this project (Python2 also needed for some special packages).
- Github and git: to organize this project and make version control
- Jupyter Notebook: to file code, visualizations and results
- Markdown, to structure the text in README and Jupyter Notebook
- Visual Studio Code: to be code editor
- Nipype: to use FSL command preprocessing image data
- DIPY: to be used as diffusion tensor imaging (DTI) fitting and denoising
- matplotlib, plotly and ipython widgets: data visualization
- Linux (Ubuntu 20.04)
Data
This project used data from online dataset offered by:
- The Developing Human Connectome Project. It consists of over 800 neonatal scans and over 250 fetal scans and can be used for data analysis after image reconstruction.
- PRIME: used this dataset to reconstruct diffusion Images. This also can be downloaded here directly.
- Since during preprocessing, we used epi data with two opposite phase-encoding directions to correct distortions, other data can also be used as the source data if it meets this requirement.
- Data used for analysis is generated from image data after preprocessing. The final data can be found in this github project folder.
Deliverables
At the end of this project, we will have: Jupyter notebook will be developed, allowing diffusion MR reconstruction and data analyzation. Weekly Deliverables are as following:
- Week 1: Assignment 2
- Week 2: README file
- Week 3: Data visualization
- Week 4: Project report and project prosentation
Results
Progress overview
Since May 11, this project goes well and three goals of this project have been reached. This is just to let me be familiar with steps and tools of diffusion MRI processing. Next, I will combine different processing methods into this project. Specifically, I would like to look deep into DTI model fitting and try to replace it by a new model created by myself.
Tools I learned during this project
- Python
- FSL, Nipype.interfaces, DIPY
- matplotlib, plotly, ipywidgets
- Function definition and calling
- Markdown
- Format this README file
- Insert figures and animation
- LaTex to edit mathematical equations
- Github
- Version control
- Project organization
- BIDS
- Jupter notebook
- Found and learnt to use some small but useful tools
- Medical file format (NII) and data structure (BIDS)
- Statistical method and machine learning
Results
Data Visualization (see gif figure below):
- 3D volume slices image
- Interactive widgets use to show preprocess results
- Interactive widgets use to show reconstruction results
Preprocessing results
DTI results
Left and right hemispheres classification results
Conclusion and acknowledgement
This project started with medical imaging data format, then preprocessed the diffusion weighted images, which includes MP-PCA denoising, FSL TOPUP distortion correction and head movement correction. After this, DTI images were reconstructed from these preprocessed images successfully. Additionally, a dataset for left and right hemispheres classification was generated from these preprocessed images. By using the KNN method, classification accuracy of 92% was reached. As a starter, I will continue this project in the future. Soon, self-made models, instead of DTI model, will be used to reconstruct diffusion images. After that, I would like to use machine learning methods to classify potential changes of brain microstructures.
Thanks to Brainhack Summer School 2020 and all instructors. Specifically, I would like to thank my instructors Noor, Greg and Agah for your advice, instruction and encouragement. I feel so lucky to find and take this summer school. During this short one month, I touched so many new skills and tools and began my first neuroscience project. I would also like to thank all the summer school students, just because of you, I know how wonderful the neuroscience world is and how active the neuroscience group is!