A desktop application for scan-level quality control (QC) of Quantitative Susceptibility Mapping (QSM) data.
QSM QC Reviewer is designed for efficient visual inspection of raw and derived QSM images in a unified interface. It supports multi-view review, structured QC scoring, segmentation overlays, case flagging, CSV-based annotation persistence, and interactive navigation optimized for high-throughput review workflows.
- Overview
- Screenshots
- Key Features
- Expected Input Files
- Output
- Typical Workflow
- Installation
- Performance Notes
- Use Cases
- Project Structure
- License
- Acknowledgments
This application is intended for workflows where reviewers need to:
- inspect raw QSM, cortical QSM, and subcortical QSM side by side,
- navigate slices quickly and smoothly,
- evaluate motion-related image quality,
- assess segmentation quality,
- add notes and review flags,
- and save case-level annotations in a structured CSV format.
The app also supports automatic generation and optional saving of derived QSM images used during review.
The reviewer interface provides coordinated image panels for:
- Raw QSM
- Cortical QSM
- Subcortical QSM
The layout is resizable, allowing reviewers to adjust panel sizes during review.
When the application opens, it first presents a Path Setup window where you can configure:
- the root data folder,
- the CSV file name,
- required input file names,
- whether generated QSM files should be saved,
- and whether segmentation overlays should also appear in derived cortical/subcortical QSM views.
This makes the application flexible across datasets and directory structures without requiring code changes.
The QC panel supports structured case-level review fields, including:
-
Motion QC
- Cortex
- Subcortex
-
Segmentation Accuracy
- Cortical
- Subcortical
-
Notes
- Free-text observations
All annotations can be saved and restored automatically from CSV.
The case list visually indicates review progress:
- completed cases can be marked with a check,
- flagged cases display a warning marker,
- previously saved annotations are restored when the app is reopened.
If a reviewer tries to move to another case while a required Motion QC field is empty, the app:
- shows a warning dialog,
- highlights the missing field in red,
- and allows the reviewer to either continue or cancel.
If the reviewer cancels and fills in the missing score, the highlight is cleared automatically.
Cases can be marked for later review using a dedicated flag option.
Flagged cases are:
- visually marked in the case list,
- saved in the CSV output,
- and can be unflagged at any time.
The app supports segmentation and label overlays for review.
Depending on the selected settings, overlays can be shown not only on the raw QSM view but also on:
- Cortical QSM
- Subcortical QSM
This helps reviewers directly compare derived QSM images with their corresponding segmentation context.
The cortical panel supports multiple display modes:
- ROI only
- Expanded
The Expanded mode combines:
- the ROI-based cortical mask, and
- the region outside the subcortical cube mask,
so reviewers can visualize both cortical ROI content and non-subcortical outer regions.
By default, the cortical panel displays the Expanded version.
Each image panel includes an independent Zoom control with:
- Fit window
- 25%
- 50%
- 75%
- 100%
- 125%
- 150%
- 200%
- 300%
- custom input values
Custom examples:
180%1801.8
The interface supports efficient navigation:
- Mouse wheel for slice scrolling
- Ctrl + mouse wheel for zoom changes in the active panel only
The viewer behavior is optimized for smoother scrolling and responsive case switching during long review sessions.
If the configured CSV file already contains saved annotations, the app restores them automatically when matching cases are loaded, including:
- Motion QC scores
- Segmentation Accuracy scores
- Notes
- Review flags
The application expects case folders containing NIfTI files used for raw and derived QSM review.
Default file definitions:
FILE_NAMES = {
"raw_qsm": "QSM_TOTAL_mcpc3Ds_chi_SFCR+0_Avg_wGDC.nii.gz",
"segmentation": "T1_SynthSeg_relabeled_corrected_to_SWI.nii.gz",
"subcortical_label": "QSM_TOTAL_mcpc3Ds_chi_SFCR_Avg_wGDC_labels_a2.nii.gz",
"cortical_qsm": "QSM_TOTAL_mcpc3Ds_chi_SFCR_Avg_wGDC_cortical_dilated.nii.gz",
"cortical_qsm_cube": "QSM_TOTAL_mcpc3Ds_chi_SFCR_Avg_wGDC_cortical_expanded.nii.gz",
"subcortical_qsm": "QSM_TOTAL_mcpc3Ds_chi_SFCR_Avg_wGDC_subcortical_expanded.nii.gz",
}These names can be customized from the Path Setup window before entering the main reviewer interface.
The application saves review annotations to a CSV file, including case-level fields such as:
- case ID
- cortical motion QC
- subcortical motion QC
- cortical segmentation accuracy
- subcortical segmentation accuracy
- notes
- review flag
If the CSV already exists, previously saved annotations are reloaded automatically.
- Launch the application.
- Configure the dataset path and file settings in the Path Setup window.
- Enter the main reviewer interface.
- Review the raw, cortical, and subcortical QSM panels.
- Adjust zoom, overlays, and panel sizes as needed.
- Assign QC scores.
- Add notes if necessary.
- Flag cases for later review when appropriate.
- Save the review.
- Move to the next case or jump to a specific case from the case list.
Prebuilt Windows versions can be downloaded from the repository’s Releases page.
After downloading:
- Extract the zip package.
- Open the extracted folder.
- Run the application executable.
A Python environment with the required dependencies is needed.
Typical dependencies include:
- Python 3.10
- PyQt5
- napari
- numpy
- scipy
- nibabel
- pandas
Install dependencies, then launch the application from the project directory.
python QCreviewer.pyReplace QCreviewer.py with the actual entry script name if needed.
The application includes several optimizations for large-scale review sessions, such as:
- background case loading,
- recent-case caching,
- smoother wheel-based slice navigation,
- reduced unnecessary redraws,
- and improved responsiveness when switching between cases.
Actual performance may still depend on:
- image size,
- storage speed,
- system memory,
- graphics environment,
- and the total number of cases being reviewed.
QSM QC Reviewer is particularly useful for:
- large cohort QSM studies,
- scan-level QC workflows,
- reviewer-driven QC pipelines,
- generation and inspection of cortical/subcortical derived QSM views,
- and projects requiring structured annotation export.
Example repository structure:
QCreviewer/
├─ QCreviewer.py
├─ README.md
├─ app.ico
├─ app.icnc
├─ logo.png
├─ cortical_labels.txt
├─ subcortical_labels.txt
├─ QCreviewer.spec
├─ build_qsm_qc_reviewer.bat
├─ docs
├─ LICENSE
This project is licensed under the Apache License 2.0.
See the LICENSE file for details.
This project uses common scientific Python and desktop visualization tools in the QSM review workflow, including components from the Python scientific computing ecosystem and Qt-based desktop UI frameworks.

