Computer Vision News - December 2021

25 Using Jupyter Notebooks This indicates that the voxel size is mm and each volume was collected at each 2 sec (*). * Strictly speaking, it takes 2 seconds to collect the data of one volume. The image size (i.e., the number of voxels) aremuch less than the anatomical imagewe investigated above because the spatial resolution of fMRI images is lower than that of anatomical images (i.e., the voxel size of the fMRI image is much larger than the anatomical image). Let's visualize a sagittal slice of the first volume in the loaded MRI image. # Sagittal plane plt.imshow(data_fmri[data_fmri.shape[0] // 2, :, :, 0].T, cmap='gray', orig- in='lower') Exercise 2 Visualize axial and coronal slices of the first volume in the loaded fMRI image. # Axial slice plt.imshow(<Complete the code>, cmap='gray') # Coronal slice plt.imshow(<Complete the code>, cmap='gray') In 4D fMRI, each voxel is a time series of BOLD signals. Let's select one voxel and display its time series. # Time course of a voxel voxel_index = [33, 78, 42] plt.imshow(data_fmri[voxel_index[0], :, :, 0].T, cmap='gray', origin='lower') plt.plot(voxel_index[1], voxel_index[2], 'r+', markersize=12) resp = data_fmri[voxel_index[0], voxel_index[1], voxel_index[2], :] plt.plot(resp) Exercise 3 Calculate temporal mean of the fMRI responses of each voxel, and plot the temporal mean as a brain image (in either sagittal, coronal, or axial plane). # Complete the code data_fmri_mean = plt.imshow() GLM This notebook provides brief instruction describing how to run general linear model (GLM) analysis on fMRI data with Python.

RkJQdWJsaXNoZXIy NTc3NzU=