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 - Probabilistic Retinotopic Mapping
    • 09 - ROI Analysis
    • Troubleshooting
  • MRI
    • MRI-Studies: General Information
    • 3D printing a brain
    • 7T anatomical analysis on neurodesk
    • MRI BIDS and OSF
    • fMRIprep analysis
    • MNI space
    • Control Masks
    • 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
  • 2 Get your data
  • 3 DICOM-Files
  • 4 DICOM to nifti
  • 5 Check the “IntendedFor” entry of the fmap’s JSON file
  • 6 Distribute the T1w files to participants?
  • 7 Defacing your data
  • 8 (Remove denoising scan from your data)
  • 9 fmriprep
  • 10 Probabilistic Retinotopic Mapping
  • 11 first-level Analysis
  • 12 Group-Level ROI Analysis
  • 13 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 your raw DICOM files to an Analysis. You can find more detailed information by navigating to the sub-pages by clicking on the caption of the respective point.

2 Get your data

There are two ways how you get your data:

  1. Regular scanning time:

    • you get the data as nifti files
    • a few days later via mri-dropoff in the J drive (Subpage for accessing other networks)
    • nifti conversion and defacing generally are already done for you then (but check 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 here)
    • defacing has to be done (see here)
Warning

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!!!

3 DICOM-Files

  • the raw files from the scanner are DICOM-Files
  • in general, we primarily use .nifti files for the subsequent steps

\(\to\) before we can continue, we need to convert DICOM- 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!!!

4 DICOM to nifti

There are two options to convert DICOM to .nifti files:

  1. Older approach: using a script from Adam that can be found here (or here: /shared/website/dcm2bids_adam.sh). All steps are also described in a separate page

  2. Newer approach: use the BIDScoin workflow implemented in /shared/website/dcm2bids_coiner.sh. All steps are also described in a separate page

both approaches should result in .nifti files in BIDS format

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

  • “tells” fmriPrep where to apply distortion correction

  • 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!

6 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

7 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)

8 (Remove denoising scan from your data)

  • if a denoising sequence was used, but you don´t use denoising data, you might have to remove the last volume of each scan before continuing

9 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

10 Probabilistic Retinotopic Mapping

  • might be necessary to specifically test potential effects in specific visual areas (e.g. V1, V2, etc.)
  • provides retinotopy information (visual areas, eccentricity, etc.) even in the absence of dedicated retinotopy runs

11 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

12 Group-Level ROI Analysis

  • in the group-level ROI analysis, you extract 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 (e.g. as a .csv file)

13 Statistical Analysis

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