Reflections on the Previous Module: MRI Scans
Your responses to these open-ended questions help me to improve the class in the future. I'll anonymize and summarize your responses as an end-of-module summary in the discussion, so you can see how your classmates feel and further share your views with me and each other.
Module Overview: BIDS and JSON
The previous module, MRI scans, ensured that you were familiar with the types of MRI scan you might use, and how to describe and view those scans. With that background, you are now ready to learn about why and how you should convert those scans from DICOM to NIfTI images following the BIDS specification.
Goals This module explains the benefits of BIDS and provides practice converting DICOM data to BIDS using different tools. This will prepare you for the rest of the class where processing is done on BIDS datasets.
Module Description BIDS (Brain Imaging Data Structure) is a best practice convention for naming and organizing your NIfTI data. I explain why you should care about BIDS, and what you need to learn to take advantage of the rich BIDS infrastructure for organizing neuroimaging data. Crucially, you need to convert your DICOM data, so I introduce you to current options including dcm2niix, ezBIDS, BIDScoin, and Heudiconv. You'll get practice with three of these: dcm2niix, ezBIDS, and Heudiconv (I chose these three because each is very different, and I have had the most success with these). You will explore the resulting data structure and naming conventions so you are aware of issues impacting the creation of a BIDS-compliant dataset. I'll introduce you to the official and evolving BIDS specification. BIDS also requires that each NIfTI image be accompanied by a JSON (Javascript Object Notation) sidecar file that contains metadata related to that image, so you will spend time learning to understand and manipulate the structure and contents of those JSON files.
Introduction
Goals To introduce and motivate BIDS (the Brain Imaging Data Structure). This lesson will start preparing you for the rest of the class where processing is done on BIDS-compliant datasets.
Learning Objectives This lesson contributes to the objective to "explain the purpose and implementation of the BIDS standard" by "explaining the purpose of the BIDS standard" and beginning to "describe the BIDS specification".
What is BIDS and why should we care?
Why BIDS? (The Brain Imaging Data Structure)
BIDS is a well-accepted convention for naming and organizing neuroimaging data.
It meets funder guidelines and requirements for data sharing and reproducibility.
It also facilitates data processing and pipeline automation.
This 4.75-minute video explains what BIDS is and why it is important.
Featured BIDS Apps
The following documentation pages are available for applications mentioned in the presentation. You will work with each of these applications in this course. Together with DICOM conversion tools, these apps, especially MRIQC, fMRIprep, and QSIprep form a crucial part of a processing pipeline.
bidsonym for defacing anatomical and anonymizing anything else in the JSON file
MRIQC for quality assessment
fMRIprep for preprocessing fMRI data
QSIprep for preprocessing dMRI (a.k.a. DWI) data
Watch this 4-minute video clip about BIDS apps.
BIDS Specification
The BIDS Specification details the expected directory and file naming standards.
Once you convert your data to BIDS (or make your first attempt), you can check that it has been done correctly using the BIDS Validator.
Although the top level directories are often called "data" and "derivatives", you can call them anything you want. What is important is that you separate the "raw" (minimally-processed) data from the derivatives of running BIDS processing.
Subject directories under data must always be named with a key-value pair: sub-fred or sub-001. Sessions can be optionally nested under each subject (e.g., sub-001/ses-itbs).
Whether or not there are sessions, the next level prescribes a limited set of modalities that are allowed, e.g., anat, func, fmap, dwi, perf and a few others (but not just anything you want).
Every image file (nii.gz) must be accompanied by a JSON sidecar file. The JSON file is a special text file containing metadata that would be lost if we simply converted DICOM to NIfTI, because the NIfTI header removes considerable information from the DICOM header.
If you include files or directories that are not BIDS compliant, validation will fail unless you specify a
.bidsignore
file. This is a small text file, following the rules used by.gitignore
. The.bidsignore
file should be placed directly in the BIDS directory.For example, the following entries tell the bids-validator to ignore any files in any directories that contain
tse
in the names:
**/*tse*
The .bidsignore
is useful for file types that are not yet handled by BIDS, or if you want to include other documentation in the directory, but BIDS does not support it.
Watch this 7.5-minute video describing the structure of BIDS directories and file names, introducing JSON sidecars, the BIDS validator, and the .bidsignore
file.
BIDS Extensions and the Future
The initial BIDS convention was focused on MRI data, but even before its release it was clear that there would be a need for extensions to accommodate additional data types. (Poldrack et al 2023). See Get involved in making BIDS better to learn more about proposed BIDS extension proposals (BEPS) and to participate in the process.
The BIDS convention has been extended to several other modalities: MEG, IEEG, EEG, Genetics, qMRI, ASL, Microscopy, PET, NIRS, as shown in the following BIDS timeline image from Poldrack 2023.

Resources
BIDS-related
CuBIDS Curation of BIDS (especially for handling large datasets)
HEDS Hierarchical Event Descriptors and the HEDS documentation describe a system for annotating functional events. It is an integral aspect of BIDS.
BIDS Presentation (The pdf of the slides that form the basis of this presentation)
Other Resources
BIDS 2024-03-28 Presentation on Bids to Stats group (Video ~50 minutes) (The current lesson includes selected clips from this presentation). Accompanying Slides: BIDS Stats group Presentation Google Slides and supplemental materials.
Poldrack, R. A., Markiewicz, C. J., Appelhoff, S., Ashar, Y. K., Auer, T., Baillet, S. et al. (2024). The past, present, and future of the brain imaging data structure (BIDS). Imaging Neuroscience, 2, 1-19. An excellent overview of BIDS history and future. I used this extensively to develop the BIDS 2024-03-28 presentation above.
In the optional ~4-minute video clip below, Martin Zweirs provides his view of why BIDS is important.
Optional Readings in Reproducibility
The following resources are all available from the Journal Articles folder under Resources in the Neuroimaging Workshops D2L site. These focus on reproducibility issues. BIDS is part of the solution, but these papers reveal that there is so much more to think about!
A classic paper, Gronenschild_2012_Freesurfer_Reproducibility.pdf, reveals that FreeSurfer analyses conducted on different operating systems have different results. This is exactly the reason that containerization is so important: when an application is built inside a container, it always runs the operating system that is installed in the container…even though you might run the container on Mac, Windows, Linux etc.
Kennedy_2019_ReproNim_Reproducibility discusses the large number of factors that influence reproducibility and an approach to making each individual paper completely reproducible by exposing all of the details of the processing. Like the Botvinik 2020 paper, it reveals that we have a long way to go.
Klapwijk_2021.pdf is a review that provides a wealth of information about factors that influence reproducibility and suggests approaches to resolving issues. The focus is on statistical power and the flexibility and transparency of data analysis. Don't be fooled by the apparent focus on developmental studies, most of what the authors have to say is broadly relevant.
Digest
Summary
Most importantly, BIDS, the Brain Imaging Data Structure, is a crucial part of this course and probably your future in neuroimaging. This lesson explains why the BIDS standard is important and gives you a taste of the naming and organization required to use it.
Less critically, the lesson introduces particular resources (BIDS validator and BIDS specification), and describes the structure of BIDS directories and file names.
What's next:
- In subsequent lessons, you'll use some of the available conversion tools to provide you with ample experience doing conversion from DICOM to BIDS. You'll also learn more about the structure of the JSON sidecar files. Later in the class, you'll take full advantage of data organized into BIDS to do anonymization, quality assessment, fMRI and DWI processing.
Topics
BIDS
BIDS Specification
BIDS Validator
.bidsignore
entity (key-value pair)
data (bids, raw) directory
derivatives
datatypes
hyphen vs underscore
modalities
anat
dwi
fmap
func
perf
TO DO
Required
✅ Discussion: Find a BIDS app (not described above) and explain why it interests you (Required).
Encouraged
In the Discussion: BIDS
✅ Propose a topic based on what was difficult or what you would like to know more about.
✅ Did you find a resource (e.g., website, video, article) that was helpful? Share the link and tell us why you liked it.
✅ Read your classmates' posts and provide feedback.