Medical Image processing project DTI & T1-MRI
Assignment Description
- After downloading, extracting and reading the nii, bval and bvec files:
- Calculate the coloured FA (fractional anisotropy) map of the exam using the
dti files. Doing so is quite complex so it's recommended to use the
dipy.reconst.dti
module of thedipy
python library. - Transform the coordinate space of the coloured FA map onto the coordinate
space of the T1 sequence using the information taken from the affine
headers of the nifti files. In order to do this, you MUST use
scipy.ndimage.affine_transform
. - Generate png images for the middle axial, coronal and sagittal slices,
displaying the grayscale T1 sequence with the coloured FA map
semi-transparently superimposed on top of it. In order to do this, you
MUST use
PIL.Image
.
- Calculate the coloured FA (fractional anisotropy) map of the exam using the
dti files. Doing so is quite complex so it's recommended to use the
Instructions
To reproduce the code:
- open the terminal in the project directory
- run the following command:
sudo docker build -t enviroment:latest .
- to make sure the docker image is created run:
docker images
- run in sudo mode:
docker run -it enviroment
- run the command:
python3 script.py
- results will be produced in the data folder
Note: for the generated png images: ‘x’ - sagittal, ‘y’ - coronal, ‘z’ - axial views.