Visual Neuroscience Lab
  • Home
  • Neurodesktop
  • Behavioral
  • Labmeeting
  • DICOM to GLM
  • MRI
  • People
  • Internship
  • Other Topics
  • Archive
  1. MRI: from DICOM to GLM Analysis
  2. 00 - Overview
  • Home
  • Neurodesktop
  • MRI: from DICOM to GLM Analysis
    • 00 - Overview
    • 01 - DICOM to BIDS
    • 02 - Check IntendedFor field of the fmap’s JSON
    • 03 - T1w for PBn
    • 04 - Defacing
    • 05 - Removing Noise Scan
    • 06 - fMRIprep
    • 07 - Retinotopic Mapping
    • 08 - first level GLM
    • 09- second level GLM
    • Troubleshooting
  • MRI
    • MRI-Studies: General Information
    • 3D printing a brain
    • 7T anatomical analysis on neurodesk
    • MRI BIDS and OSF
    • fMRIprep analysis
    • MNI space
    • Old MRI setup
    • Update to the MRI lab setup
    • Physiological noise correction
  • Behavioral
    • Vision tests
    • BIDS for behavioral studies
    • Custom-built chin rests
  • People
    • Stipends and prizes for master and PhD students
    • Coffee time
    • Participant compensation
    • Things to do if you are leaving the lab
    • Scientific writing in practice
    • Research funding opportunities
  • Internship
    • Pflichtpraktikum
    • Internship Checklist
    • internship/claustrum_segmentation.qmd
  • Other Topics
    • Calculating a priori sample size using G Power
    • Gamma correction
    • Contribute to the website
    • Older ways to access the server
  • Labmeeting
  • Archive

On this page

  • 1 General
    • 1.1 Two ways to your data
  • 2 DICOM-Files
  • 3 DICOM to nifti
  • 4 Check the “IntendedFor” entry of the fmap’s JSON file
  • 5 Distribute the T1w files to participants?
  • 6 Defacing your data
  • 7 (Remove denoising scan from your data)
  • 8 fmriprep
  • 9 Retinotopic Mapping
  • 10 first-level Analysis
  • 11 second-level Analysis
  • 12 Statistical Analysis
  1. MRI: from DICOM to GLM Analysis
  2. 00 - Overview

00 - Overview

Overview about how to get from DICOM files from the Scanner to your GLM Analysis
Author

MG

Published

July 28, 2025

1 General

This page gives an overview and brief information about the necessary steps to get from the DICOM files to a GLM Analysis. You can find more detailed information by navigating to the sub-pages by clicking on the caption of the respective point.

1.1 Two ways to your data

  1. Regular scanning time:

    • you get the data as nifti files
    • a few days later via mri-dropoff in the J drive
    • step 1 and 4 generally are already done for you then (but check the defacing anyway, sometimes this doesn´t work!)
  2. Scanning with Natalia

    • we have the raw DICOM files
    • conversion to niftis has to be done (see 1)
    • defacing has to be done (see 4)
    • IMPORTANT: Load the DICOM files to the server and delete them from any external/local device (USB-Stick, local storage of your computer, etc.) as soon as possible!!!

2 DICOM-Files

  • the raw files from the scanner are DICOM-Files
  • not really useful since we need .nifti files for our analysis \(\qquad\to\) first step is to transform the DICOM- to .nift-files
  • need to be converted to nifti files
DELETE DICOMS FROM YOUR OWN DEVICES AS SOON AS POSSIBLE

Load the DICOM files to the server and delete them from any external/local device (USB-Stick, local storage of your computer, etc.) as soon as possible!!!

3 DICOM to nifti

  • using a script from Adam that can be found here (or here: /shared/dcm2bids.sh)
  • results in .nifti files in BIDS format

4 Check the “IntendedFor” entry of the fmap’s JSON file

  • tells fmriPrep on what files distortion correction should be applied to

  • depending on the fMRIprep version you plan to use, the field has to look slightly different!

  • to avoid unnecessary problems and delays, it doesn´t harm to always check this field before running fMRIprep!

5 Distribute the T1w files to participants?

  • if you promised participants that they will get their T1w images, you should make sure that they really get them
  • this should be done before defacing
  • You should delete the “non-defaced” files either after you distributed them to the respective participants, or after your study ended

6 Defacing your data

  • defaced data is necessary to savely run fMRIprep
  • Save faced T1w-files to give to your participants (if you got the data during regular scanning times, there should be a faced directory, but you should still make sure, that you have the faced T1w files if you need them for your participants!)
  • NEVER share data (e.g. on open Neuro) that was not defaced before!
  • Defacing is done with pydeface (Docker; Version 2.0.2)

7 (Remove denoising scan from your data)

  • if a denoising sequence was used in the scanner, but you don´t use denoising in your analysis, you might have to remove the last volume of each scan (which basically is a noise scan) before continuing

8 fmriprep

  • one of many BIDS-Apps (that require a BIDS-valid Dataset)
  • combines various anatomical and functional preprocessing steps within one tool
  • necessary, time intense process

9 Retinotopic Mapping

  • if you want to specifically test potential effects in specific visual areas (e.g. V1, V2, etc.), you might need to do retinotopic mapping

  • this allows you to differentiate different visual areas, eccentricity and more

10 first-level Analysis

  • in the first level GLM you process the data of individual subjects
  • for each subject, you define/estimate a model that can explain your data
  • you define meaningful contrasts (e.g. your experimental conditions)
  • you account for potential confounds

11 second-level Analysis

  • in the second level GLM you extract the relevevant (for your reasearch questions/hypothesis) information from your first level GLM
  • you should save this information in a format that allows you to later run your statistical analysis

12 Statistical Analysis

  • with your extracted data (that are saved in a .csv file), you can now run your statistical analysis
Back to top