BIDS for fMRI
BIDS was originally developed for the structuring of MRI data. As a result, this version of the BIDS specification has the most supports and related applications.
- BIDS uses NIfTI files for the images (ideally compressed).
- JSON sidecar files are used for dictionary-type data.
- Tabular data is stored using tab separated files (.tsv).
- It is possible to include legacy text file formats or proprietary files conformed to the BIDS structure as needed, however, you should convert any files that can be converted to a non-proprietary format.
Programs such as MRIcroGL (which includes Dcm2niix), create the proper data structure, as well as the JSON sidecar files in the process of converting files from DICOM to NIfTI.
The NIfTI format does not automatically transfer all of the metadata from the DICOMs. The JSON files supply the missing metadata that is not automatically included when converting files from DICOM to NIfTI.
The .tsv and .json files used to store tab separated and dictionary type data must often be created by the researcher, but conforming to BIDS file naming conventions and structure can be automated.
The folder hierarchy should become self-explanatory once learned. BIDS allows for file types not currently covered by the specification to be included in the dataset. Just use common-sense naming based on the specification. A JSON file containing a basic dataset description is included at the first level within your NIfTI folder. It provides the name of the dataset (required), the version of BIDS you are using (required), the license for distribution of the data (recommended), the authors and curators of the data (optional), acknowledgments (optional), how to acknowledge (optional), funding (optional), references and links (optional), and the dataset’s DOI (optional).
- Conversion to a BIDS dataset functions best when converted directly from raw DICOMs using a BIDS compatible program to create the NIfTI files. The JSON sidecar files will also be created at the same time. It is difficult to create a BIDS dataset directly from NIfTI files, because some of the necessary metadata for the JSON files will be lost.
- There may be certain metadata which must be manually included when converting DICOMS from the Phillips machine, so this is something to be aware of. For more information on issues that may arise in the use of Philips DICOMS with Dcm2niix follow this link
- Some items may need to be converted by hand, for example, slice timing, which must be converted from milliseconds to seconds.
- There may be notable differences in the conversion of enhanced DICOM to NIfTI, in particular when converting to BIDS (see this link).
A README file should be included with specific information about the dataset, such as detailed protocols. This README file should be in ASCII or UTF8. A CHANGES text file can be provided to document the history of changes and corrections made to the dataset.
Information on participants is included in a group of participant metadata files. These should never include sensitive data, such as a participants’ name, but rather include things like the participant’s handedness, their age, gender, and if they are within the patient or control group, if relevant. Assign new dates to the data, as they may enable identification of the participant.
Dates should be shifted in a consistent manner across participants to preserve understanding of the relative timing of subjects.
If there were specific differences in a particular participant’s session (head movement artefacts, anomalies in how the session was performed, for example, if the participant left and returned to the scanner for any reason, etc.), these can be recorded in a file at the session level. If there were no anomalies, all of the information about participants can be recorded in at the base level.
Derivatives, such as brain maps, should be stored separately in the BIDS scheme in a clearly marked folder.
Conversion Tools for MRI
MRIcroGL contains Dicm2niix and has a convenient GUI for its usage which will convert DICOM to NIfTI and also create the necessary JSON files. It is a dependency for many other BIDS convertors.
In Matlab, Dicm2nii makes the process of converting files somewhat easier.
PyBIDSconv, a GUI-based BIDS convertor is a good alternative for those who prefer using Python programming language. Because of the Python package dependencies required to run this convertor, we recommend use with a DVI which has the proper dependencies pre-installed.
There are a number of other options to automate your data structure conversion. A list of options is provided here by the Rorden Lab
The BIDS starter kit also provides a number of solutions for those just beginning to use the structure.
A major incentive for adopting BIDS even prior to sharing a dataset is that the dataset becomes more easily machine readable. BIDS-apps have been developed for prep tasks and data analysis.
Most BIDS-apps run using a Docker container, however Docker usage is limited at UiO due to security issues. Work is currently being done to ensure that usage of BIDS apps is an option in the future. Containers may be added to your VDI or TSD using a Singularity-compatible image file, then run as any other executable program within TSD.
Many apps are currently in development. More apps can be found at this BIDS Github, which is regularly updated as new apps are released or updated: