TUI layout and keys
qsmxt tui starts the interactive terminal interface. The Quick start
and the guides say how to use it for each task; this page is its layout
and keys.
When the TUI opens it shows a Did you know? tip. Press Enter on OK to close it,
or n to see the next tip. To stop the tips, press → to select Don’t show tips and
then Enter. Press ? at any time to see a tip. When tips are off, its Show tips at
startup button turns them back on. The setting is saved in ~/.qsmxt/tips.json. Setting
the QSMXT_NO_TIPS environment variable also turns tips off, for example on a shared
install.
Basic and Advanced settings
Section titled “Basic and Advanced settings”The Reconstruction tab starts in Basic mode: each section shows the choices most people make
(whether a step runs, its method and variant, inputs you supply, outputs) and hides the
parameters that tune a method, such as iterations, tolerances and weights. The last row of a
section says how many are hidden (+ 15 advanced settings · A). Press A, or Enter on that
row, for Advanced mode, which shows every setting; A again goes back. QSMxT remembers your
choice.
Basic mode never hides a setting that matters to your run. A setting shows whenever it differs from QSMxT’s default (or, when you chose a pipeline on the Pipeline tab, from that pipeline’s value), has a value that is not allowed, or has a recommendation still open. The mask recipe shows as one line until you edit it. The command preview and the methods text always cover every setting.
Layout
Section titled “Layout”The top row holds the tabs; press a digit (1–5) or Tab/Shift-Tab to switch. You can
also press ↑ at the top of a tab to put focus on the tab bar (the current tab turns yellow).
←/→ then move between tabs, and ↓ or Enter go into the tab.
The Reconstruction tab holds every setting of the run, in sections listed in a sidebar on its
left and grouped as the run goes: Preprocessing (Geometry, Masking, Motion), QSM (Compute
QSM, Field map, Background, Inversion, COSMOS/STI, Reference, and the outputs made from χ:
χ-separation and SMWI), Other outputs (Magnitude, SWI, Relaxometry, Segmentation) and Export (DICOM). It opens on Masking, with focus in the sidebar
(the current section turns yellow): ↑/↓ choose a section, and → or Enter go into its
settings; ← from any setting (or ↑ from the first) goes back to the sidebar on the same
section, and ↑ from the first section to the tab bar. [ and ] switch sections from anywhere on the tab. A mouse click on a section
opens it, and on a group’s heading opens the group’s first section.
The sidebar lists every section whatever the settings, and marks how each stands: off (dimmed)
when its output is not made, such as χ-separation until it is ticked (the QSM heading reads off
when QSM is); – (dimmed) when the settings skip its stage, such as background removal for an
inversion that takes the total field, which the section then explains; ⚑ when a setting in it
has advice offered as a change, and ⓘ for information only (see Recommendations). On a short
terminal the sidebar drops its blank lines, then turns its headings into rules, then scrolls
around the current section (▲/▼). Narrower than 78 columns, the sections become a strip of
sub-tabs along the top of the panel instead, chosen with ←/→, with ↓ going into them and
← from a setting coming back to them. The
Methods tab’s two pages, Methods text and Graph, are a sidebar too (a strip when narrow), and the
Pipeline tab’s list of pipelines is drawn the same way.
The help for the highlighted setting sits under the settings. From 138 columns wide, it moves to a column on the right instead, so the settings use the panel’s full height; the settings keep 76 columns and the help takes up to 64. Notes in a section wrap to the width they are given.
| Tab | Pages | What is there |
|---|---|---|
| 1 Input | — | Input mode, dataset/output/config paths, include/exclude patterns and the run tree, number of echoes, and the orientation groups: a pattern, or groups given to runs with ←/→ in the run tree (one of them the reference), each run marked with its group |
| 2 Pipeline | — | The pipeline to start from: QSMxT’s defaults or an original toolbox’s, and what choosing it changes: Enter previews the changes and Apply makes them (see Toolbox pipelines). About, at the top of the list, says what the toolbox pipelines are |
| 3 Reconstruction | Preprocessing: Geometry · Masking · Motion | Axial resampling and output space, slice-gap check, crop to mask, FFT padding, coil combination (multi-coil data); the mask recipe, custom masks, the magnitude’s inhomogeneity correction and the two-pass reliable mask; motion correction and its rigid registration |
| QSM: Compute QSM · Field map · Background · Inversion · COSMOS/STI · Reference · χ-separation · SMWI | Whether QSM is reconstructed (SMWI turns it back on and χ-separation needs it, unless a QSM is supplied); unwrapping and B0 estimation; background-field removal (inversions of a local field only); the dipole inversion; how an orientation group is reconstructed (without one, where to choose it); the χ reference; the χ-separation method and its parameters; SMWI | |
| Other outputs: Magnitude · SWI · Relaxometry · Segmentation | whether the combined magnitude is published; SWI; T2*, R2*, R2 and R2′ maps, the R2′ source and supplied maps; segmentation (SynthSeg or a dseg from derivatives) and per-structure statistics | |
| Export: DICOM | DICOM export: the source DICOM to inherit the study from, and a tick for each map the settings make (all ticked to begin with; a map turned on later is ticked too; a ticks them all) |
|
| 4 Execution | — | Local or SLURM, each with its own settings; debug logging, force re-run, clean-up; and a button that does what F5 does |
| 5 Methods | Methods text · Graph | The methods text for the current settings, under a Copy methods text button that copies it to the clipboard (c, or Enter inside the page). Graph: the pipeline the current settings run, step by step: each step’s algorithm and settings, and the steps it reads from and what it reads. Above it, the peak memory the run is estimated to need and the deep-learning models it uses, with their download sizes. It is planned on the first selected run’s scan (a typical scan until one is chosen). The Open graph button above it (s, or Enter inside the page) saves it as an SVG drawing and opens it |
Settings appear only where and when they apply: a sub-setting sits indented under the
checkbox or choice it belongs to, and a map another output needs reads as ticked (and says why
when you try to untick it). ↑/↓ move, Space ticks a checkbox, Enter edits a value, r
resets the focused setting, R the whole section, and F5 runs. No setting changes with
←/→: every choice (a method, ROMEO or Laplacian unwrapping, a mask’s algorithm, how its
sections combine) shows as a button, [ medi ▾ ], and Enter opens its list, with the current
value highlighted; Enter chooses, Esc closes it with nothing changed. A mask’s numbers (BET’s
fractional intensity, a refinement step’s value) are typed like any other value (Enter), and
+/- nudge them by a step. The help line and the key hints at the bottom say what Enter does
(“Enter: choose method”). The button at the bottom of the Execution tab runs too, and its label says what will
happen: Run, Dry run, Write SLURM scripts or Submit SLURM jobs.
| Key | Where | Does |
|---|---|---|
1–5, Tab, Shift-Tab |
anywhere | switch tab |
← → |
tab bar | previous / next tab |
↓, Enter |
tab bar | go into the tab |
↑ ↓, Home End |
sidebar (Reconstruction, Methods) | previous / next section, first / last (Reconstruction); ↑ from the first goes up to the tab bar |
→, Enter |
sidebar | go into the section or page |
← → |
sub-tab strip (when narrow) | previous / next page |
← |
a section’s settings, a Methods page | back to the sidebar (or the strip), on the same section |
↓, Enter |
sub-tab strip | go into the page |
↑ |
sub-tab strip | go up to the tab bar |
[ ] |
any tab with sections or sub-tabs | previous / next one |
↑ ↓ |
settings | move; ↑ from the first setting returns to the sidebar or strip, or to the tab bar on a tab without either |
← → |
editing a value | move the cursor |
Space |
settings | tick a checkbox |
Enter |
settings | open a button’s list ([ … ▾ ]) or edit a value; on the Execution tab’s button, run |
+ - |
Reconstruction › Masking | nudge a mask number (fractional intensity, a step’s value) |
r / R |
settings | reset the setting / the whole section |
a |
Reconstruction › DICOM | tick every map to export |
A |
Reconstruction | show every setting (Advanced) or the basic ones (Basic) |
P |
settings | go to the Pipeline tab |
↑ ↓, Enter |
Pipeline | choose a pipeline; preview its changes, then Apply or Cancel |
s (Enter inside the page) |
Methods › Graph | save the pipeline as an SVG drawing and open it (the Open graph button) |
c, y (Enter inside the page) |
Methods › Methods text | copy the methods text to the clipboard (the Copy methods text button) |
F5 |
anywhere | run |
? |
anywhere | show a tip (and turn startup tips on or off) |
n |
tab bar | read the announcements |
u |
tab bar | update QSMxT, or install another release |
q, Esc |
anywhere | quit |
Copying goes through the terminal (the OSC 52 escape sequence), so it reaches the clipboard of
the machine you are typing on even when QSMxT runs on a remote server over SSH. Most current
terminals support it (iTerm2, kitty, WezTerm, Alacritty, foot, Windows Terminal; xterm with
allowWindowOps). Inside tmux, set set -g set-clipboard on. If the clipboard stays empty,
select the text in the Methods tab with the mouse instead, holding Shift (Option in iTerm2) while
you drag, since the TUI uses the mouse itself (see Mouse).
Everything can also be done with the mouse:
- Click a tab, a section in the sidebar, or a sub-tab to switch to it. A group’s heading in the sidebar opens its first section.
- Click a setting to use it: a checkbox ticks, a button (
[ … ▾ ]) opens its list, and a value opens for editing. Any other row, such as Add section or the Execution tab’s run button, is focused by the first click and pressed by the second. - In a list (a method’s list, the Pipeline tab’s pipelines), the first click highlights an entry and the second chooses it.
- Click the Methods tab’s button (Copy methods text, Open graph) to press it. A click anywhere on a Methods page goes into it.
- Click a pop-up’s button to press it. A click outside an open pop-up closes it, as
Escdoes, and does nothing else. - The wheel scrolls what is under the mouse. Over the methods text or the graph it scrolls
them wherever focus is, even in the sidebar. Over a section’s settings while focus is in the
sidebar (or the sub-tabs), it scrolls the settings and focus stays where it is. Elsewhere it does
what
↑/↓do: it moves through the settings and lists, and scrolls the pop-ups that scroll. It stays on the page rather than moving up to the sidebar, the sub-tabs or the tabs.
With the mouse in use, most terminals select text only while you hold Shift (Option in iTerm2).
To leave the mouse to the terminal entirely, set QSMXT_NO_MOUSE=1.
The Methods › Graph drawing is written to the system’s temporary folder. Over SSH, or with no
display, QSMxT does not try to open it and shows where it was written instead, so you can copy
it to your own computer. A run writes the same drawing next to its results (pipeline.svg).
The TUI shows the qsmxt run command for the current settings as you change them, and every
run saves its settings to derivatives/qsmxt/pipeline_config.toml, which --config (or the
Input tab’s Config file) loads back.