Skip to content
QSMxT v9 is a ground-up rewrite in Rust. Coming from the Python version (8.x)? See what changed →

Input data

QSMxT reads BIDS datasets. If you convert your DICOMs with qsmxt dicom-convert the layout is handled for you, and this page is mostly reference. If you are assembling a dataset by hand, or wondering why an output did not appear, start here.

Terminal window
qsmxt validate study/bids

This reports every run it discovers, the echo times and field strength it read, and which outputs your data can support. Run it before a long job:

sub-01_acq-gre_MEGRE
Echoes: 4
Echo times: [0.004, 0.012, 0.02, 0.028] s
Field strength: 3.0 T
Magnitude: present
MESE (spin-echo): not found
Capabilities:
QSM reconstruction: yes
R2*/T2* mapping: yes
SWI: yes

The pipeline discovers a run from its phase images:

sub-*/[ses-*/]anat/*_part-phase_*.nii[.gz]

with matching JSON sidecars containing EchoTime and MagneticFieldStrength. Multi-echo data uses the BIDS echo-<N> entity. Magnitude images sit alongside as *_part-mag_*, and are optional for a basic QSM run but required by most other outputs.

Two further acquisitions are recognised when present:

Pattern Provides
sub-*/[ses-*/]anat/*_part-mag_*.nii[.gz] magnitude, for R2*/T2*, SWI and masking
sub-*/[ses-*/]anat/*_echo-*_MESE.nii[.gz] multi-echo spin-echo, for R2 and hence R2’

A MESE acquisition needs at least three echoes to fit R2. Fewer are ignored.

Phase is what a run is discovered from, so it is present for everything below. This table lists what each output needs in addition to it.

Output Also requires
QSM nothing, though magnitude is recommended and some masking options need it
SWI (--do-swi) magnitude
R2*/T2* (--do-r2starmap, --do-t2starmap) magnitude, at least 3 echoes
R2 (--do-r2map) a MESE acquisition, at least 3 echoes
R2’ (--do-r2primemap) magnitude and a MESE acquisition, for R2* and R2

Source separation (--do-chisep) splits into two groups. The r2star-qsm and decompose methods work from multi-echo GRE magnitude alone. The other six are based on R2’, so they need a MESE acquisition as well.

QSMxT will use maps produced by other tools from <bids>/derivatives/<TOOL>/, following the same sub-*/[ses-*/]anat/ layout:

Option Supplies Filename
--use-custom-masks [TOOL] brain mask *_mask.nii*
--use-custom-qsm <TOOL> susceptibility map *_Chimap.nii*
--use-custom-r2 <TOOL> R2 map *_R2map.nii*
--use-custom-r2prime <TOOL> R2’ map *_R2primemap.nii*

Supplying R2’ directly removes the MESE requirement for source separation, since R2 is only needed to compute it. qsmxt validate lists the derivative tools it can see for each run.