dcm2bids

The dcm2bids converts your DICOM data to BIDS format on XNAT. This is the essential first step that unlocks access to all modern analysis pipelines including MRIQC, fMRIPrep, TractoFlow, and others.

For comprehensive information about dcm2bids, visit the official documentation.

What You Need

  • DICOM data uploaded to your XNAT session

  • Project permissions to run pipelines

  • dcm2bids configuration file

How to Launch the Pipeline

Note

For step-by-step instructions on running any pipeline, see Running Pipelines on XNAT. To enable pipelines for your project, see Enabling Pipelines for Your Project.

Navigate to your session in XNAT, click “Run Pipeline”, select “dcm2bids”, and configure these parameters:

  • Subject Number (Optional): Leave this empty unless you want to use a different subject ID than the one derived from the DICOM. When left empty, the pipeline automatically extracts the subject number from the session label and zero-pads it to 4 digits (e.g. 0201sub-0201).

    Warning

    Do not enter a subject number here unless you specifically need to override it. If you do enter a value, XNAT strips any leading zeros before passing it to the pipeline — so entering 0201 will produce sub-201 instead of sub-0201. To preserve the correct zero-padded ID, simply leave this field empty.

  • Session Number (Optional): Override automatic session numbering

  • Enable Pydeface (Default: True): Automatically deface anatomical images

Automatic Features: - SBRef processing and fieldmap associations are handled automatically - BIDS validation ensures compliant output

What You Get

BIDS-formatted data in your session’s Resources/rawdata/ directory:

Resources/rawdata/
  dataset_description.json
  participants.tsv
  sub-<subject>/ses-<session>/
    anat/ → T1w, T2w images + JSON metadata
    func/ → BOLD runs, SBRef images + JSON metadata
    fmap/ → Fieldmaps + JSON metadata (with IntendedFor configured)

For BIDS format details, see BIDS Format.

Configuration Files (Advanced)

For non-standard acquisition protocols, create a config.json file and upload it to your parent project. The pipeline will automatically detect and use it.

For configuration file creation, see the dcm2bids configuration guide.

Common Issues

Non-Standard Sequence Names: Create custom configuration file for site-specific protocols

Missing Data: Ensure all required sequences (T1w, functional) were acquired

Privacy Settings: Disable pydeface if needed using pipeline parameters

Next Steps

  1. Quality Control: Run MRIQC to assess data quality

  2. Preprocessing: Use fMRIPrep for functional data processing

  3. Data Access: Use Download via Browser to download converted data