Skip to content
Mehul Gajwani edited this page Mar 3, 2025 · 1 revision

Qdec is a GUI-based function implemented in Freesurfer that allows users to fit GLMs to the surface data.

However, due to some limitations of Qdec, MRI_glmfit is usually used to achieve higher flexibility of the design and contrast design. tksurf is later used for visualisation, extracting ROI/vertex data (e.g, thickness), piloting as well as small-area multiple comparison correction. A detailed notes about these methods can be found here.

Running Qdec

Step 0, preparation

Save the xlsx file in to csv file, using tab instead of comma is better.

Make sure -qcache is processed; check as below:

$ recon-all -s sub-320 -qcache
Started at Wed Aug 12 00:53:56 AEST 2020
Ended   at Wed Aug 12 01:04:21 AEST 2020
Roughly 10 mins.

Step 1, starting Qdec

Let’s try freesurfer/6.0:

$ module load freesurfer/6.0

$ module load virtualgl
$ vglrun qdec`

Step 2, specify the design

This means your qdec is not ready, checking step 0:

Step 3, process and review the data

Review the results from qDEC

Step 4, Visualize the results

$ module load virtualgl
$ vglrun tksurfer -annot aparc fsaverage lh pial

To map a volumetric map (e.g., stat image) on a cortical surface using Connectome workbench

  1. Download the latest version of Freesurfer and set environment variables etc
  2. Download connectme workbench tools: https://www.humanconnectome.org/software/connectome-workbench
  3. Download (git clone) the GIFTI toolbox: https://github.com/gllmflndn/gifti.git
  4. Download (git clone) CBIG tools from Thomas Yeo’s Lab: https://github.com/ThomasYeoLab/CBIG
  5. Download files from the repo:
    • Add MNItoFSAVERAGE.m file to path
    • download the files from the surfaces directory (give different representations of LH and RH surfaces)
  6. Open matlab
  7. Open MNItoFSAVERAGE.m and ensure paths in function are all correct for your setup
  8. Run the function to map the volumetric file to the surface; e.g., MNItoFSAVERAGE(‘myStatMap.nii’,’~/outputDirectory/')
  9. Open wb_view
  10. Click skip. A window will appear
  11. Click File > Open > (set filter to all files) > select lh.surf.gii (or rh.surf.gii) [from Surfaces.zip]. This is an inflated white matter surface. You need to load this first. You can then load the other afterwards and toggle between surfaces. These are representations of the fsaverage brain
  12. To load an overlay, click Open > File > (set filter to all files) > Select .gii of map
  13. Click ‘on’ in the bottom left
  14. Change colour palette using monkey wrench
  15. Hit yellow button next to overlay control to add/delete overlays

Clone this wiki locally