qc — QC visualisation outputs#

Schema: QCConfig in src/thesis/core/config/validators.py. Controls the QC workflow (thesis run -w qc) and the post-workflow QC hook that runs automatically after the hcp workflow when generate_overlays: true.

Field

Type

Default

Constraints

Description

generate_overlays

bool

False

Produce ROI overlay PNGs at the end of the HCP workflow. Output: <output_dir>/qc/roi_overlays/.

track_density_thresholds

List[float]

[50.0, 90.0, 99.0]

each in (0, 100)

Percentile thresholds for track-density visualisations. The QC workflow renders one PNG per percentile. Sorted ascending at validation time.

synthseg_qc_threshold

float

0.6

typical range (0, 1)

Minimum acceptable SynthSeg QC score. Subjects below this are flagged in the batch summary.

outlier_sd_threshold

float

2.0

Number of standard deviations from the batch mean used to flag tractography outliers (waytotal, voxel counts, etc.). Also used by thesis stats collect (--sd-threshold CLI flag overrides).

Example#

qc:
  generate_overlays: true
  track_density_thresholds: [50, 90, 99]
  synthseg_qc_threshold: 0.7
  outlier_sd_threshold: 2.5

Output layout#

When the QC workflow runs (or the post-workflow hook is enabled):

<output_dir>/qc/
├── roi_overlays/             # ROI mask overlays on anatomical background
├── normtracks/                # Track-density figures (one per percentile)
├── stats/                     # Tractography statistics tables
└── checks/                    # Extended checks (SynthSeg QC, Jacobian, fibre quality, ...)

Notes#

  • The QC workflow is best run after a successful hcp run — it reads existing tractography outputs and atlas warps from the patient output directory.

  • The post-workflow hook is best-effort: failures are logged as warnings but do not fail the workflow.

  • For atlas-level QC (occupancy, core mask, CV), see atlas_qc.