Skip to content

Convert DICOM to BIDS

Goal: turn the DICOMs from your scanner into a BIDS dataset, which is what QSMxT runs on. This is the same for every scanner.

  1. Preview how QSMxT will name each series. Nothing is written yet:

    Terminal window
    qsmxt dicom-convert /path/to/dicoms study/bids --dry-run

    Each line is one series and the name it will get, for example:

    acq-SWI3mm SWI_3mm [Magnitude] 2×TEs=[9.4…19.7]ms -> sub-01_acq-SWI3mm_echo-<N>_part-mag_MEGRE
    acq-SWI3mm SWI_3mm [Phase] 2×TEs=[9.4…19.7]ms -> sub-01_acq-SWI3mm_echo-<N>_part-phase_MEGRE
    acq-t1scout t1_scout [Extra] TE=2.0ms -> extra_data/1_t1scout

    Your gradient-echo scan should appear as part-mag and part-phase images (MEGRE for several echoes, T2starw for one). Anything else goes to extra_data/. Warnings after the list point out incomplete exports.

  2. Convert:

    Terminal window
    qsmxt dicom-convert /path/to/dicoms study/bids
  3. Check that QSMxT finds your scans:

    Terminal window
    qsmxt validate study/bids

In the TUI, choose Input mode → DICOM -> BIDS, fill in the DICOM directory and the output directory, check the series list (you can relabel a series there), and press Convert to BIDS.

qsmxt validate lists every run it found, with its echo times and field strength, and says QSM reconstruction: yes. If a scan you expected is missing, it was probably classified as something else: look for it in sub-*/extra_data/.

Most data converts with no changes. These pages say what QSMxT does for particular data:

Every series type the conversion recognises is in How QSMxT reads your data, and the name each gets in Input data layout.

By default the conversion removes everything that identifies the patient or the study. If you will send results back to a PACS, add --keep-dicom-uids. It keeps the study’s UIDs and dates, still without the patient’s name, ID or birth date, so a later DICOM export files its series into the original study:

Terminal window
qsmxt dicom-convert /data/dicoms study/bids --keep-dicom-uids

In the TUI, tick Keep DICOM UIDs above Convert to BIDS.

Next: Run QSMxT on your data.