Skip to content

Visual QC: prove the mask is where you think

Tonight · ~40 min · hands-on · energy: active · setup: 3D Slicer + a RIDER CT/SEG case (TRACE-CT QC bundle)

Every concept in this chapter is invisible in an array and visible in a viewer. A mask that is one slice off the tumour, a resampling that shifted the boundary, a registration that quietly misaligned — these are things you see, then measure. This lesson is a real Visual-QC pass on RIDER data: the capstone that turns the affine, the slice normal and the resampling rule into an auditable check.

The anchor: a mask can look right and be geometrically wrong

Open a CT with its tumour mask. The mask is a coloured overlay roughly where the tumour is. Is it exactly on the tumour, in every plane, at every slice? You cannot tell from one axial view. You need to walk the volume in three planes, toggle the mask, and compare source against processed — and then record a verdict. That is Visual QC, and TRACE-CT has a real, scripted process for it.

3D Slicer as a geometry viewer

3D Slicer is the best tool for seeing geometry because it reads the affine for you and renders true multi-planar views. The 3D Slicer companion maps the verified Witowski lessons to these concepts; use it rather than rebuilding a generic tutorial. The points to internalise while you work:

  • scrolling coronally through an axially-acquired volume is resampling in disguise (lesson 7) — Slicer computes the reformat from the direction matrix;
  • the import groups files by SeriesInstanceUID and resolves the frame of reference (Chapter 1, lesson 5);
  • window/level maps HU→display, recalling the slope/intercept of Chapter 1.

The Visual-QC pass (TRACE-CT RIDER)

TRACE-CT exports QC bundles (source CT + source mask + processed CT + processed mask) and a Slicer launcher that opens them in a 2×3 layout (rows: source vs processed; columns: axial/coronal/sagittal) with a lung window. Run it to see the geometry concepts:

  1. Load the study. Drag the RIDER CT series into Slicer; confirm the lung window (W≈1500, L≈−600) and that axial/coronal/sagittal reformats are consistent (they are all computed from one geometry).
  2. Overlay the tumour mask. Load the segmentation (from the SEG or the exported .nrrd). Toggle visibility on/off. Confirm the mask sits on the tumour, not one slice off. (If it is off, you have found a geometry/origin bug — re-derive the affine and re-run lesson 5’s checks.)
  3. Inspect the 3D model. In Models / Segmentations, toggle the 3D view. A mask that “shimmers” at the boundary is partial-volume / label noise (lesson 7); a mask with an obvious slab is a slice-thickness artefact (Chapter 1).
  4. Compare source vs processed. Open the processed image + processed mask (post-resample). Walk through slices and ask: did the tumour shape survive resampling? Is the boundary in the same physical place? Toggle between source and processed to catch a mis-registration.
  5. Record a verdict. Use TRACE-CT’s scripts/visual_qc/record_review.py (PASS / FAIL / NEEDS_INVESTIGATION + reason). This is real, auditable QC — exactly what a radiomics pipeline must do before trusting its features.

Bridge

When you toggle the mask off and the tumour disappears with it, in all three planes, at every slice, you have visually verified the affine, the slice ordering and the CT↔SEG geometry agreement at once. That is the whole chapter in one gesture. When something is off, the plane/slice where it fails tells you which lesson’s check to re-run.

Files to read alongside

  • tools/slicer/open_qc_bundle.py — the launcher and 2×3 layout.
  • scripts/visual_qc/qc_bundle.py — geometry validation, mask metrics, round-trip comparison.
  • schemas/visual-qc-bundle-v1.schema.json — what a QC bundle records (provenance, geometry, hashes).

These are read-only references into TRACE-CT (do not copy them here); see the TRACE-CT learning map.

What to retain

  1. Visual QC is where geometry stops being abstract: a misaligned mask, a shifted boundary, a slab artefact are all things you see in three planes.
  2. Walk source vs processed in axial/coronal/sagittal; toggle the mask; check the 3D model for shimmer (partial volume) and slabs (slice thickness).
  3. Always record a verdict (PASS / FAIL / NEEDS_INVESTIGATION + reason) — QC that is not recorded is QC that did not happen.
  4. A failure in a specific plane/slice points back to the specific check (affine, ordering, CT↔SEG geometry, resampling) that needs re-running.

You have finished Chapter 2. For the full IOP/IPP equation reference, the SimpleITK bridge, the failure-mode catalogue and the TRACE-CT code map, see the geometry reference. Then continue to Chapter 3 — Quantitative imaging and radiomics.