MRI planes reconstruction

67 views Asked by At

In the following code i read a MRI scan with 3D images.The scans are axial slices. By executing the following code I try to obtain the sagittal and the coronal planes. My problem is that there is some much noise and I would like to know what I do wrong

from load_MRI_FLAIR import scan
import matplotlib.pyplot as plt
from scipy import ndimage
import numpy as np

print(scan.shape) #(22, 512, 512)
z,y,x =  scan.shape
SLICE_NUM = np.random.randint(0,22)
print("SLICE_NUM:",SLICE_NUM)

coronal = ndimage.zoom(scan, (x/z,z/y,1), order=5)
print("coronal.shape",coronal.shape) #coronal.shape (512, 22, 512)

sagittal = ndimage.zoom(scan, (x/z,1,z/y), order=5)
print("sagittal.shape",sagittal.shape) # sagittal.shape (512, 512, 22)

scans =[scan[SLICE_NUM,:,:],coronal[:,SLICE_NUM,:],sagittal[:,:,SLICE_NUM]]

plt.figure(figsize=(10,5))
for i in range(3):
    plt.subplot(1,3,i+1),plt.imshow(scans[i],cmap='gray')
plt.show()

enter image description here

1

There are 1 answers

0
Jim Quirk On

Non-python MR person here so I can't comment on the code. However, I think your images actually look fine and I am not seeing any particular "noise" in your image. I believe the issue is likely one of resolution.

"Traditional" 2D MRI images are not typically acquired in isotropic resolution in all three directions. Instead, the slice is often 10-20 fold thicker than the in-plane resolution. So, when you rotate the image, the voxels are going to be much bigger along the original slice-selection direction.

It is also worth noting that by default, MATLAB plotting commands assume voxels are square and you would need to use a command like daspect to display non-square voxels correctly.