Skip to content

Tool for converting DICOM folders to a standard BIDS format dataset, with extra options for longitudinal pre-/post-surgical MRI data.

Notifications You must be signed in to change notification settings

FBK-NILab/Dataset2BIDS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Dataset2BIDS

Tool for converting DICOM folders of pre-/post- surgical longitudinal data into the Brain Imaging Data Structure (BIDS) standard

Usage

Dataset2BIDS.sh -i <input_dir> -o <output_dir> -c <config> [-e <epre>] [-p <pre>] [-s <post> ] [-l <lpost>]

Compulsory arguments:
    
	-i, --inputdir      directory of the dicoms folderts of the subjects    
	-o, --outputdir      outpu directory of the resulting BIDS style data
	-c, --config        configuration file specify the naming convention
   
Optional input:

	-p, --pre           pre surgery data unique identifier label 
	-e, --early-pre     early pre surgery unique identifier label
	-s, --early-post    early post surgery unique identifier label     
	-l, --late-post     late post surgery unique identifier label 

Example of configuration file

The option --config (or -c) accepts in input a JSON (.json) configuration file. Here is an example of a configuration file, where T1-w (named T1-w), rs-fMRI (named task-rest_run-01) and Diffusion-Weighted Imaging MRI data (named dwi) are considered.

 {
   "descriptions": [
      {
         "dataType": "anat",
         "modalityLabel": "T1w",
         "criteria": {
            "SidecarFilename": "001*"
         }
      },
      {
         "dataType": "func",
         "modalityLabel": "bold",
         "customLabels": "task-rest_run-01",
         "criteria": {
            "SidecarFilename": "002*"
         },
         "sidecarChanges": {
            "TaskName": "rest"
         }
      },      
      {
         "dataType": "dwi",
         "modalityLabel": "dwi",
         "criteria": {
            "SidecarFilename": "003*"
         }
      }
   ]
}


Dependences

In order to use the tool dcm2bids must be installed.

for example, you can install it via conda

conda install -c conda-forge dcm2bids

or via pip

pip install dcm2bids

About

Tool for converting DICOM folders to a standard BIDS format dataset, with extra options for longitudinal pre-/post-surgical MRI data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages