BIDS Format - tannerjared/MRI_Guide GitHub Wiki
The Brain Imaging Data Structure (BIDS) is one popular format for organizing MRI data. BIDS is particularly useful for the sharing of data sets between researchers. This is part of the push towards more transparent research and improved reproducibility.
DICOM to BIDS
There are a number of tools available to convert MRI data into the BIDS format. One of them is Dcm2Bids. This relies on an installation of dcm2niix.
Installation of dcm2niix
dcm2niix can be installed easily on Linux, Mac, or Windows.
Github Releases provides the latest compiled executables. This is an excellent option for MacOS and Windows users. However, the provided Linux executable requires a recent version of Linux, so the provided Unix executable is not suitable for all distributions.
MRIcroGL includes dcm2niix that can be run from the command line or from the graphical user interface (select the Import menu item). The Linux version of dcm2niix is compiled on a holy build box, so it should run on any Linux distribution.
If you have a MacOS computer with Homebrew you can run brew install dcm2niix
.
If you have Conda, conda install -c conda-forge dcm2niix
on Linux, macOS, or Windows.
On Debian Linux computers you can run sudo apt-get install dcm2niix
.
Building from source is also possible. Please refer to the dcm2niix documentation for instructions.
dcm2bids installation
Dependencies
- Python 2 or 3 with the future module, pip will install it automatically
- dcm2niix: DICOM to NIfTI conversion tool.
dcm2bids installation with pip
There are several ways:
pip install dcm2bids
or pip install https://github.com/cbedetti/Dcm2Bids/archive/master.zip
or git clone https://github.com/cbedetti/Dcm2Bids.git ; cd Dcm2Bids ; pip install .
Don't forget to use --user
or -e
flags depending on your needs. See pip install --help
for more information.
dcm2bids use
Before you can successfully run dcm2bids, you need to understand the directory and file name structure of BIDS. Visit this site for an introduction.
Then visit this site for tutorials to get you started. Or, you can work through the documentation on the dcm2bids site. Rather than reproducing those instructions here, I encourage you to visit those other sites for instructions.