Skip to content

genchandenur/Occipital_Surface_Extraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

A fMRI Study: Occipital Surface Extraction from Cortical Surface Model

Overview

Today, functional connectivity analyzes based on Functional Magnetic Resonance Imaging (fMRI) data and detecting neuronal activity in the brain have gained an important place in brain research. The physical basis of fMRI depends to blood-oxygen-level-dependent (BOLD) contrast which derived from a mismatch of blood flow and oxygen metabolism during local neural activation. Studies of how the brain represents complex visual objects and the perception experienced by the subject are extremely important in terms of understanding the working of the brain.

In this repository, there are studies on visual stimulus reconstruction from fMRI activation models, which are revealed by the presentation of visual stimuli in various object categories. In terms of applicability of statistical learning approaches involving neuroscience, the BOLD5000 dataset containing approximately 5,000 different slow event-related fMRI human functional MRI (fMRI) images will be used. As data preprocessing steps, it is aimed to increase the classification accuracy by removing the visual cortex, which is known to contain information about the distinctions to be made, from the images. It is aimed to test the performance of deep learning-based algorithms with 2 different data types: The first is to extract the cortical surface model for each subject, in which the stimulus image hides the neighborhood relations, using Freesurfer software. Secondly, the performance of the algorithm in creating the stimulus image using raw images will be analyzed. The generative adversarial network (GAN) architecture, which is often used in the machine learning framework, will be used to reconstruct the stimulus image from the pre-processed and raw images.

Table of Contents

  1. DICOM Mosaics to Patient Coordinate System Mapping
  2. FreeSurfer Single Subject Pipeline Analysis Overview
  3. Occipital Patch Removal from Cortical Surface and Flattening
  4. Volume to Surface Projection using Freesurfer
  5. Flattened fMRI Activity Surfaces and Concatenate Both LH and RH
  6. References

DICOM Mosaics to Patient Coordinate System Mapping

This Python script processes image files within a specified directory structure, creates a target folder, and organizes these files by converting them into the desired format using the FreeSurfer command. We saved mosaic T1-weighted images in NIfTI format. Check mri_convert

python3 mri_convert.py
mosaic mosaic to 3d volume
Figure: DICOM mosaics to 3D volume data transformation

FreeSurfer Single Subject Pipeline Analysis Overview

Recon-all provides pre-processing of the three-dimensional anatomical volume of a single subject. Check out the Freesurfer tutorial on the usage and outputs of the recon-all command.

$ recon-all -i T1w_MPRAGE_CSI1.nii.gz -s CSI1 -all

where -i flag is anatomical images, -s is subject name and -all flag will run all of the preprocessing steps on your data.

Occipital Patch Removal from Cortical Surface and Flattening

TkSurfer tool in Freesurfer toolset was used to create occipital patches. TkSurfer allows for visualization and navigation through cortical surface data. TkSurfer can also display functional or curvature data on the surface. Take a look TkSurfer.

Brodmann V1 and V2 regions created during the cortical reconstruction process completed with recon-all were used in the occipital patch extraction process. Take a look Broddman Areas.

$ tksurfer CSI1 *h inflated -gray

tksurfer

The following cutting steps are applied to both hemispheres.

Step 1

1 tksurfer CSI1 lh inflated -gray

Step 2

2 Rotate around to view the occipital pole. Click a point to mark the posterior end of the relief-cut line.

Step 3

3 Rotate back to the lateral view. Add a couple more points to define the line.

Step 4

4 Click ‘Cut line’ button after adding the points.

Step 5

5 Output of the ‘Cut line’ process.

Step 6

6 Click on the anterior end of the calcarine sulcus.

Step 7

7 Click points as desired to define the occipital patch boundary.

Step 8

8 Click the ‘Cut plane’ button to finalize the patch.

Step 9

9 Save the patch as lh.occip.patch.mgh.

Step 10

10 Run mris_flatten to flatten the patch.

Step 11

11 Load Brodmann V1 and V2 labels.

Step 12

12 Final output with loaded Brodmann areas.

The occipital patches cut from the cortical surface are flattened for each hemisphere.

handenur@handenur-VirtualBox:/usr/local/freesurfer/subjects/CSI1/surf$ mris_flatten -w 0 lh.occip.patch.mgh lh.occip.flat.mgh
handenur@handenur-VirtualBox:/usr/local/freesurfer/subjects/CSI1/surf$ mris_flatten -w 0 rh.occip.patch.mgh rh.occip.flat.mgh

Volume to Surface Projection using Freesurfer

This script is designed to project volumetric fMRI images onto surface models using the mri_vol2surf command from the FreeSurfer software for volume-to-surface registration.

python3 registration.py
cort proj
Figure: fMRI Activation Projection on Cortical Surface

Flattened fMRI Activity Surfaces and Concatenate Both LH and RH

Flat surfaces were filled with activation values using linear interpolation method. Check out LinearNDInterpolator function in Scipy.

python3 flatmap.py
python3 lh_rh_concat.py

References

  1. Generative adversarial networks for reconstructing natural images from brain activity
  2. BOLD5000, a public fMRI dataset while viewing 5000 visual images
  3. End-to-End Image Reconstruction of Image from Human Functional Magnetic Resonance Imaging Based on the "Language" of Visual Cortex
  4. Functional magnetic resonance imaging (fMRI)"brain reading": detecting and classifying distributed patterns of fMRI activity in human visual cortex
  5. fMRI Brain Reading: detecting and classifying distributed patterns of fMRI activity in human visual cortex

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages