Skip to content

Pipeline to map visual input from the retina to neurons using mrVista software.

Notifications You must be signed in to change notification settings

marco-create/Retinotopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Retinotopy

Retinotopy is a procedure to map the projections of visual neurons from the retina to the visual brain areas.:eyes: :brain:
The following procedure has been created to provide a clear and step-by-step pipeline in modelling the features of population receptive fields (pRF) of neurons in visual areas of human brain.
The main software is mrVista developed by vistalab from Stanford University.
The functional preprocessing is made using Statistical Parametric Mapping (SPM12).

Stimuli definition:

  • expanding ring ➡️ 6 cycles;
  • rotating wedge (counterclockwise):arrow_right: 6 cycles.
    We have two runs for each stimulus.

0. Freesurfer reconstruction of anatomical surface

Use Freesurfer to reconstruct the anatomical surface from T1 image (check this tutorial).
Follow the instructions on how to set up Freesurfer on your system.

The reconall step lasts about 8-9 hours!

Setting up folder tree 📁

Create a Projects directory in your system and inside that a directory named Retinotopy.
Create the following tree inside the retinotopy directory:

C:.
└───Retinotopy
    └───subject_01
        ├───3DAnatomy
        ├───Inplane
        ├───Raw
        └───Stimuli

Cd into the subject folder.

cd subject_01

mrVista software requires an Inplane image to proceed. If you did not acquire that, like me, just run the inplane_mrVista.m script. Remember to paste in in the niftiRead call, one of your functional images:

cd ./Raw
inplane_mrVista.m
movefile myInplane ../Inplane
% now return into the main subject folder
cd ../

1a. Anatomical image and meshes from Freesufer

To obtain the anatomical after Freesurfer autorecon, run anatFrom_FS.m.
Just remember to change the subject name, inside the script (lines 18 and 19), to match the Freesurfer output subject.

After that, run meshFrom_FS.m to obtain 3D meshes for both hemispheres.
Again, change the subject name accordingly (line 12).

1b. Preprocessing using SPM

Briefly, use SPM to preprocess functional imaging.
The steps I've being used are:

  • realign: est+reslice
  • coregister: est
  • normalise: est+write

Use only one batch, defining two sessions; one session for expanding ring and one for rotating wedge.

2. Session creation

Now you can run the init function a_init_Align.m to generate the mrSESSION inside the subject folder.
Just remember to change EPI scans name from line 8. You can modify also line 24 and 26 with annotations:

% Subject name
params.subject      = 'your_subject_name';
% Name for each of the loaded scan (2 rings and 2 wedges in this case)
params.annotations = {'eccen out','eccen out','polar CCW','polar CCW'};

and run it.
Now an Inplane window should be opened.

3. Align inplane to anatomical image manually

Click on

Edit >>> Edit/View Aligment...

to open the alignment panels.
This step needs few practice but you can find an helpful video tutorial here. Follow all the steps she is performing and save

  • Xform Settings
  • mrVista alignment
  • mrVista bestrotvol

and you can exit from there.
To save and close the inplane window, click on

File >>> Save Preferences
File >>> Quit

in this way, you keep everything clean.

4. Check alignment and install gray segmentation

Now you can run the script b_checkAlign_installGray.m. Remember to stay in the subject directory, where the mrSESSION has been created.
Check the new mounted gray ROI on the inplane. If it looks reasonably well, save and close inplane as we did above. Otherwise, repeat the alignment.

5. Average time series from GUI

Open again an Inpane view

mrVista

and go to

Analysis >>> Time Series >>> Averages tSeries

a new window has been opened:

Start with the eccentricity runs.

  • Inside the Annotation for average scan? write Average of Eccentricity;
  • Select (1) eccen out and (2) eccen out scans and press OK. Wait until the process is completed;
  • repeat for Polar. Go to Averages tSeries, change the annotation to Average of Polar;
  • Select (1) polar CCW and (2) polar CCW scans and press OK. Wait until the process is completed.

Now, in the Inplane window, if you click on the menu dataType:, on the right side of the GUI, you can select the Averages (before it was only Originals).
Save and close.

6. Tranform the time series using trilinear interpolation

In the MATLAB command window, run c_interpol.m. A new UI window is opened.

Be sure to select the Averages in dataType: !

Now you are ready to compute the correlation analyses for eccentricity and polar maps. Go to

Analysis >>> Travelling Waves Analyses >>> Compute corAnal >>> compute corAnal (all scans)

the process is quite fast. You can load the maps going to

File >>> corAnal >>> load corAnal

to see the map on the three axes, click to View >>> Phase map.
Use the slider menus on the right side of the GUI to adjust the threshold.

7. Meshes visualisation

From the current window (3 view), open meshes to visualise eccentricity or polar map on 3D surfaces.

Gray >>> Surface Mesh >>> Load and Display

Choose which hemisphere you want to display. An additional window showing a 3D brain surface should be show up.
Back to 3 view GUI,

Gray >>> Update Mesh

Eccentricity map

Polar map

TO DO 🕒

  • General overview of retinotopy pipeline;
  • population receptive field (pRF);
  • mapping surface with polar map;
  • SPM batch for preprocess automatization;

Utils and links

All files are adapted from mrVista tutorials. ⬇️⬇️⬇️⬇️

About

Pipeline to map visual input from the retina to neurons using mrVista software.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages