How a scan decides what each MRI series is, from how it was acquired, and the evidence it weighs for every name. Every number and every rule here can be changed.
What it does
A series name is typed by a person at the scanner and can be wrong; dcm2niix, the converter BIDS Manager uses for DICOM, guesses a BIDS name from a few strings in the header, and is wrong in ways that repeat: a contrast-enhanced T1w named as a plain T1w, ASL and its M0 scan confused, maps the scanner computed converted as data. The classifier names each MRI series from how it was acquired instead, and uses dcm2niix's guess as a second opinion. How names are decided shows three real series judged all three ways, and where the classifier sits in the order of the scan's steps.
On 256 series checked by hand, from scanners of several vendors, it named 99.2 % right, against 89.1 % with the classifier off (dcm2niix's guess, the name patterns and the scan rules).
It names MR images only. Spectroscopy, PET and CT keep the names the other steps give them, and it never replaces a name in a datatype its rules do not cover.
Where the idea comes from
Naming MRI series from their acquisition parameters is not new: dcm2niix's guess and earlier tools do it too. Part of the inspiration for BIDS Manager's classifier came from SWIFTCAT, a tool that converts mostly anatomical MRI to BIDS from acquisition parameters, developed by Marta Loureiro, Rita G. Nunes and Rita Reis Nunes (Evolutionary Systems and Biomedical Engineering Lab, LaSEEB, University of Lisbon) and Patricia Clement (Department of Medical Imaging, Ghent University Hospital, UZ Gent).
BIDS Manager's classifier is its own early implementation of this idea. It works well overall, and every name it gives can be checked and changed (Seeing why). The SWIFTCAT team is putting a lot of effort into improving the approach for MRI, testing it on clinical and heterogeneous data. SWIFTCAT is not public yet: stay tuned for its release, which could also be plugged into BIDS Manager as a classification algorithm.
How a series is named
Each series is scored alone. The scan reads the series' acquisition parameters from its DICOM header (echo, repetition and inversion times, flip angle, readout, number of volumes, b-values, phase encoding, a contrast agent, the ASL protocol, and the vendor's private fields where they say more). Each piece of evidence for or against a name adds its weight to that name's score, and the scores become a confidence between 0 and 1.
The session is looked at as a whole. A single-band reference sits immediately before its run with the same geometry; a few-volume EPI with the opposite phase encoding of a run is that run's fieldmap; two inversions of one gradient echo are an MP2RAGE; a phase series beside its magnitude twin is the same run's part-phase. These add evidence, and entities (dir, inv, part).
The name is decided, against dcm2niix's guess:
When
The name used
Both agree
that name, confirmed
The classifier is sure (confidence at or above Name without asking above, 0.8) and they differ
the classifier's, and the row says what dcm2niix suggested
The classifier is unsure (between the two thresholds)
the one the series name agrees with, and the row is marked to check
The classifier has no opinion (below Leave to the other opinions below, 0.4)
the name the other steps gave (dcm2niix's guess, a scan rule without Force, or the series name), marked to check
A forced scan rule (Settings > Scan rules) wins over all of this during a scan. Naming a table again later (below) does not know which rows a rule or a hand edit named, and can rename them.
Seeing why
The confidence column of the Table view shows how sure the classifier was. Select a row and scroll Properties to Why this name: the evidence for and against the name, and the other names it considered with their confidence. Naming recordings goes through it on the course's sample.
Switching it off
Settings > Classification > Use the acquisition parameters:
Choice
What happens
To name the series (default)
as above
Only to report
the names come from the other steps (your scan rules, dcm2niix's guess, the series name), as before 1.5.0; the classifier's verdict is recorded and shown, but not used
Not at all
the classifier does not run
The same from the command line: bidsmgr-scan --classifier applied|shadow|off.
The settings
Every number the classifier tests is a setting: the two thresholds, the weight of each kind of evidence (parameters, series name, neighbouring series), and the ranges that tell contrasts apart (the inversion time of an MPRAGE, the echo time of a T2-weighted image, the number of volumes of a BOLD run, and so on). They are listed, with their ranges and defaults, under Classification in Settings.
From the command line, the same settings are a JSON file:
bidsmgr-classify names the series of an existing inventory.tsv again from the features the scan cached, without reading any DICOM, so you can try a setting on a whole study in seconds. --apply writes the new names into inventory.tsv, including over names a forced scan rule or a hand edit gave: check those rows afterwards.
The rules
What counts as evidence for each name is a file of rules, the rulebook. Each line is one piece of evidence: a feature of the acquisition or a word in the series name, a test, a weight (positive for the name, negative against), and the sentence Why this name shows. Ranges named after a setting take their values from the settings above.
Settings > Classification has Export the rules... and Load rules...: export the rulebook, change a weight or add a piece of evidence in the file, and load it back. Only what differs from the shipped rules is kept with your settings, so a later version of BIDS Manager still brings its own improvements to the rest.
The shipped rules
The rules of BIDS Manager 1.5.0, name by name. Names under exclude/ are what the classifier says should not be converted.
T1-weighted anat/T1w
Evidence
From
Weight
not an EPI readout
Parameters
+0.5
an inversion-recovery gradient echo (MPRAGE-like)
Parameters
+3.5
a spin echo with a short echo and repetition time
Parameters
+3
a gradient echo with a short echo, a short repetition time and a large flip angle
Parameters
+2.5
a magnetisation-transfer pulse before a short echo (MT-weighted T1, as for neuromelanin)
Parameters
+1
a fast 3-D spoiled gradient echo
Parameters
+1.5
more than one volume
Parameters
-2
a derived image
Parameters
-3
a long inversion (FLAIR)
Parameters
-3
one inversion of an MP2RAGE
Parameters
-2.5
the name says T1
Series name
+2.5
the name says another contrast
Series name
-1.5
a magnetization-prepared 3-D gradient echo (MPRAGE)
Parameters
+1
a high-resolution 3-D acquisition
Parameters
+0.5
a time-of-flight angiogram
Parameters
-2.5
T2-weighted anat/T2w
Evidence
From
Weight
a spin echo with a long repetition time and an echo of {value} ms
Parameters
+3.5
an EPI readout
Parameters
-3
a long inversion (FLAIR)
Parameters
-3.5
a gradient echo, not a spin echo
Parameters
-2
more than one volume
Parameters
-2
read at many echo times
Parameters
-2
a derived image
Parameters
-3
the name says T2
Series name
+2.5
the name says another contrast
Series name
-1.5
a turbo spin echo
Parameters
+0.5
a high-resolution 3-D acquisition
Parameters
+0.5
FLAIR anat/FLAIR
Evidence
From
Weight
an inversion long enough to null the fluid
Parameters
+4
an EPI readout
Parameters
-3
more than one volume
Parameters
-2
a derived image
Parameters
-3
the name says FLAIR
Series name
+3
a turbo spin echo
Parameters
+0.5
a high-resolution 3-D acquisition
Parameters
+0.5
Proton density weighted anat/PDw
Evidence
From
Weight
a spin echo with a long repetition time and a short echo ({value} ms)
Parameters
+3
an EPI readout
Parameters
-3
more than one volume
Parameters
-2
the name says proton density
Series name
+3
a turbo spin echo
Parameters
+0.5
T2*-weighted anat/T2starw
Evidence
From
Weight
a single long gradient echo
Parameters
+3
an EPI readout
Parameters
-3
more than one volume
Parameters
-2
a magnetisation-transfer pulse
Parameters
-2
the name says T2*
Series name
+2.5
Multi-echo gradient echo anat/MEGRE
Evidence
From
Weight
a gradient echo with three or more echoes
Parameters
+3.5
an EPI readout
Parameters
-3
read at one or two echo times
Parameters
-2
the name says multi-echo
Series name
+2
Multi-echo spin echo anat/MESE
Evidence
From
Weight
a spin echo with three or more echoes
Parameters
+3.5
an EPI readout
Parameters
-3
the name says multi-echo spin echo
Series name
+2
MP2RAGE inversion anat/MP2RAGE
Evidence
From
Weight
one of two inversions read by a 3-D gradient echo
Parameters
+3.5
a derived image
Parameters
-3
the name says MP2RAGE
Series name
+2.5
MP2RAGE uniform image anat/UNIT1
Evidence
From
Weight
the scanner's uniform (UNI) image
Parameters
+5
the name says UNI
Series name
+2.5
T1 map anat/T1map
Evidence
From
Weight
the scanner's T1 map
Parameters
+5
the name says T1 map
Series name
+2.5
Angiography anat/angio
Evidence
From
Weight
an EPI readout
Parameters
-3
the name says angiography
Series name
+3.5
a flow-compensated 3-D gradient echo with a short repetition and a moderate flip angle: time of flight
Parameters
+4
computed by the scanner (a projection)
Parameters
-3
BOLD run func/bold
Evidence
From
Weight
an EPI readout
Parameters
+2
a time series of {value} volumes
Parameters
+3
only {value} volumes: a reference, not a run
Parameters
-3
diffusion weighting
Parameters
-6
slice times recorded
Parameters
+0.5
the name says BOLD
Series name
+2
the name says SBRef
Series name
-3
the name says reference
Series name
-1.5
the name says diffusion
Series name
-3
an echo time of {value} ms, typical of BOLD
Parameters
+1
repeats every {value} s
Parameters
+0.5
acquired during a contrast bolus
Parameters
-5
the protocol labels arterial blood (ASL)
Parameters
-5
the scanner marks it ASL
Parameters
-4
the scanner marks it PERFUSION
Parameters
-3
Single-band reference func/sbref
Evidence
From
Weight
a single EPI volume
Parameters
+1.5
more than one volume
Parameters
-3
diffusion weighting
Parameters
-3
a b=0 diffusion volume
Parameters
-1.5
the name says SBRef
Series name
+4
Diffusion dwi/dwi
Evidence
From
Weight
b-values up to {value} s/mm²
Parameters
+4
{value} gradient directions
Parameters
+2
an EPI readout
Parameters
+1
a derived image (a map)
Parameters
-3
a single volume
Parameters
-1
the name says diffusion
Series name
+2.5
the name says SBRef
Series name
-3
Diffusion single-band reference dwi/sbref
Evidence
From
Weight
a single EPI volume
Parameters
+1
more than one volume
Parameters
-3
the name says SBRef
Series name
+3
the name says diffusion
Series name
+1
Fieldmap magnitude (two echoes) fmap/magnitude1
Evidence
From
Weight
a gradient echo read at two echo times
Parameters
+4
a magnitude image
Parameters
+0.5
an EPI readout
Parameters
-3
the name says fieldmap
Series name
+2.5
Fieldmap magnitude (beside a map in Hz) fmap/magnitude
Evidence
From
Weight
read at two echo times: the magnitudes of a phase difference
Parameters
-2
a magnitude image
Parameters
+0.5
an EPI readout
Parameters
-3
the name says fieldmap
Series name
+2
Fieldmap phase difference fmap/phasediff
Evidence
From
Weight
the phase of a two-echo gradient echo
Parameters
+4
an EPI readout
Parameters
-3
the name says fieldmap
Series name
+2
Fieldmap (Hz) fmap/fieldmap
Evidence
From
Weight
a single-echo phase image of a gradient echo
Parameters
+2
an EPI readout
Parameters
-3
the name says B0 map
Series name
+2.5
Reversed-phase EPI reference fmap/epi
Evidence
From
Weight
an EPI readout
Parameters
+2
a few volumes ({value})
Parameters
+1
only b=0 volumes: a reference for distortion correction
Parameters
+2.5
diffusion weighting
Parameters
-2
the name says reference
Series name
+2.5
the name says SBRef
Series name
-2.5
Arterial spin labelling perf/asl
Evidence
From
Weight
several volumes
Parameters
+0.5
the name says ASL
Series name
+4.5
the protocol labels arterial blood (pulsed or pseudo-continuous)
Parameters
+4
the scanner marks it ASL
Parameters
+3
computed by the scanner (a subtraction or CBF map)
Parameters
-3
the name says perfusion
Series name
+1
the name says M0
Series name
-4
one or two volumes: an M0 reference, not label and control pairs
Parameters
-1.5
a map computed from the ASL series, not the series
Parameters
-6
ASL M0 perf/m0scan
Evidence
From
Weight
the name says M0
Series name
+5
an unlabelled ASL readout of one or two volumes
Parameters
+1.5
labelled arterial blood over many volumes: the ASL series
Parameters
-3
computed by the scanner
Parameters
-3
a map computed from the ASL series, not the series
Parameters
-6
Contrast bolus (DSC perfusion) exclude/dsc
Evidence
From
Weight
an EPI time series acquired during a contrast bolus
Parameters
+5
the scanner marks it PERFUSION
Parameters
+2
computed by the scanner (a perfusion map)
Parameters
-3
the name says perfusion or bolus
Series name
+1.5
Localizer (left out) exclude/localizer
Evidence
From
Weight
{value} slice orientations in one series
Parameters
+5
only a few slices
Parameters
+1
the name says localizer
Series name
+4
a high-resolution 3-D series
Parameters
-2
Derived or reformatted (left out) exclude/derived
Evidence
From
Weight
a reformat or projection the scanner computed
Parameters
+5
a derived image
Parameters
+1
the name says reformat
Series name
+2
the name says mask
Series name
+4
a map the scanner computed from a perfusion series (subtraction, CBF)
Parameters
+5
Esc
Nothing found. Try a shorter word, a menu name or a command.