Computer Vision News - December 2021

24 Introduction to Neuroscience Image Processing Sagittal, coronal, and axial slices Image from https://users.fmrib.ox.ac.uk/~stuart/thesis/chapter_3/section3_2.html # Visualize the middle sagittal plane plt.imshow(data_t1[:, :, data_t1.shape[2] // 2].T, cmap='gray') Exercise 1 Visualize axial and coronal planes of the loaded image. # Axial slice plt.imshow(<Complete the code>, cmap='gray') # Coronal slice plt.imshow(<Complete the code>, cmap='gray') Functional MRI image (4-D NIfTI image) Next, let's take a look at a 4-D MRI image. # Load functional MRI images (4-D NIfTI image) img_fmri = nibabel.load('data/sub-01_ses-perceptionNaturalImageTest01_task-percep- tion_run-01_bold .nii.gz ') # Extract the image as an array data_fmri = np.asanyarray(img_fmri.dataobj) data_fmri.shape You can see that the loaded image is 4-dimensional. The first three dimensions are spatial and the 4th is temporal. So, the image contains whole brain fMRI data from 239 timepoints. The fMRI image at each timepoint is called volume. Let's check the dimension-direction correspondense and voxel size. nibabel.aff2axcodes(img_fmri.affine) Thus, the dimension-direction correspondense of the loaded image is: • 1st dim: right to left • 2nd dim: anterior to posterior • 3rd dim: inferior to superior img_fmri.header.get_zooms()

RkJQdWJsaXNoZXIy NTc3NzU=