Stroke cases#
For a selected region, the viewer plots lesion volume against Western Aphasia Battery Aphasia Quotient (WAB-AQ) for every person in the Aphasia Recovery Cohort (ARC) whose lesion covers at least 5% of the region, and draws one or two chosen lesions on the brain. The 228 lesions are the authors’ SPM12-normalised maps, carried onto CDMD through a SynthMorph registration of the cohort’s mean brain. The cohort is selected for aphasia; no case is a prognosis.
Fig. 28 | Two lesions of equal volume reaching one region, with opposite language outcomes. a, Stroke cases for the left subcentral gyrus and sulci (destrieux:left:4), 90-day test window: 94 people reach the region; lesion volume (log axis) against WAB-AQ, dashed line at 93.8 (within normal limits). Blue, ARC M2295: Broca’s aphasia, WAB-AQ 15.5, 110.0 cm³, 80% of the region. Pink, ARC M2272: no aphasia, WAB-AQ 93.9, 112.2 cm³, 26% of the region. They are the first of 30 Similar size, different score pairs (78 points apart). b, The two lesions on CDMD: M2295 alone (blue), M2272 alone (pink), shared voxels (green); left lateral view, cortex see-through, region outlined.#
Data#
Input |
Detail |
|---|---|
Cohort |
ARC (Gibson et al. 2024): 228 adults with chronic left-hemisphere stroke recruited for aphasia studies; OpenNeuro ds004884 v1.0.2, CC0 |
Scores |
|
Lesions |
228 binary maps on SPM12’s 1 mm grid, drawn on each person’s T2 and normalised by the authors (SPM12 unified segmentation with enantiomorphic healing); AphasiaRecoveryCohortDemo commit |
Mean brain |
|
Target |
CDMD |
Method#
Registration#
scripts/register_stroke_cases.py (FreeSurfer 8.2) registered the mean brain to brain.mgz with mri_synthmorph register -m joint (affine and deformable). The mean, not SPM12’s template, was registered: it lies in the lesions’ space, and its ex vacuo left ventricle matches CDMD better (left caudate Dice 0.85, against 0.66 through SPM12’s template). SynthMorph ran on the CPU; its output is recorded by checksum, not expected to reproduce bit for bit.
Lesion transfer#
stroke_cases.reader samples each lesion through the forward displacement field: for each CDMD voxel, the moving point is its RAS plus the displacement, read by linear interpolation on the lesion’s own grid. A voxel is kept where the interpolated mask is ≥ 0.5 (keep_at). On the first lesion the reader must agree with mri_synthmorph apply to Dice ≥ 0.999. Each lesion is stored as \((start, length)\) runs of Fortran-order voxel indices on aseg’s grid in data/cdmd/stroke-lesions.npz, with aseg’s vox2ras-tkr.
Registration scoring#
mri_synthseg --parc --robust segmented the mean brain; the segmentation, carried by mri_synthmorph apply -m nearest, was scored against CDMD’s aseg (coordinate_spaces.checks), with a round trip of every brain point through the forward and inverse fields. Limits were fixed on 4 November 2026, before measurement (Validation).
Selection rules#
Test window. Gap \(= |d_\text{test} - d_\text{scan}|\); windows 90 days (default), 365 days, any.
Pairs. Volume ratio ≤ 1.25 and AQ difference ≥ 25; widest AQ gap first; each person in one pair only.
Exceptions. Share ≥ 0.40 and AQ ≥ 76; at most 3, highest AQ first.
Severity bands (Kertesz 2007): very severe 0, severe 26, moderate 51, mild 76, within normal limits 93.8.
Differences. For two cases: the selected region, then regions of the same atlas or
asegthat either lesion reaches, by absolute share difference; 6 rows.
Display#
stroke-cases.json loads on first selection. Stroke cases in the Deficits list opens the selected region’s section; with nothing selected it selects the region shown that the most lesions reach and says so. stroke-cases.masks (little-endian uint32 runs) loads when a lesion is first drawn and is checked against its SHA-256 and the run offsets. The Stroke cases section shows the scatter (log volume, WAB-AQ 0–100, axis fixed per region across windows), Much of it damaged, mild or no aphasia, Similar size, different score and Where they differ. The test window is chosen under Tested within. Each dot takes a press anywhere nearer it than any other dot, out to 12 px (22 px with a coarse pointer), and the plot’s labels are set at the caption size, so they grow with the reader’s text size. A closed Table of cases under the plot lists every case in it, sortable by Case, Lesion volume, cm³ and WAB-AQ; each row is its dot’s twin. One lesion is drawn in the overlay ink colour; two are drawn as first-only, second-only and shared voxel sets in the comparison and shared colours. Each set is meshed by surfaceOf: binary field, separable kernel (0.06, 0.24, 0.4, 0.24, 0.06; σ ≈ 0.85 voxel) on each axis, then clamped to ≥ 0.55 inside and ≤ 0.45 outside the set, and marching cubes at 0.5. The clamp keeps a one-voxel sheet and a one-voxel gap. Solids are double-sided and clipped by the section planes; the cortex is held see-through while cases show. URL state: cases=<id>[,<id>], at most two distinct ARC ids.
Validation#
Test |
Criterion |
Result |
|---|---|---|
Hemisphere agreement ( |
≥ 0.98 |
0.998 |
Subcortical Dice, minimum / median |
≥ 0.70 / ≥ 0.80 |
0.739 (left pallidum) / 0.868 |
Cerebral cortex Dice |
≥ 0.65 |
0.721 |
Round trip, median / p95 |
≤ 0.5 / ≤ 1.0 mm |
0.045 / 0.181 mm |
Share of each lesion inside the brain ( |
≥ 0.90 |
0.973 (minimum 0.850) |
Right-hemisphere share of lateralised lesion voxels, median |
≤ 0.02 |
0.0 (maximum 0.019) |
Field reader against |
Dice ≥ 0.999 |
1.0 |
|
Shares and masks rebuilt from stored lesions equal the published files; acceptance re-applied |
passes; 228 cases reach 642 regions |
|
Definition and lesion list, malformed definitions, T2 dating, unrecorded type, Fortran-order runs, shares and floor, cross-cut consistency, reader on another grid, acceptance, placement |
passes |
Subcortical Dice (left / right): thalamus 0.862 / 0.877, caudate 0.850 / 0.854, putamen 0.880 / 0.911, pallidum 0.739 / 0.880, hippocampus 0.845 / 0.862, amygdala 0.861 / 0.900, lateral ventricle 0.873 / 0.897. Front-end checks: web/src/lib/core/catalog/stroke-cases.test.ts (reach, pairs, exceptions, bands, differences, validation) web/src/lib/engine/lesion/stroke-cases.test.ts (run decoding, pair partition, closed surface of a voxel cube, one-voxel sheet kept, one-voxel gap open) and web/src/features/inspector/StrokeCasesSection.svelte.test.ts (focus handoffs, download failures, press targets, label size, table of cases).
Limitations#
A selected chronic left-hemisphere aphasia cohort: lesions without aphasia are under-sampled.
One WAB per person. The scan–test gap exceeds 90 days for 76 of 228 people (152 in the default window), 365 days for 55, and reaches 5,528 days (15.1 years); 47 were tested before their scan.
WAB-AQ measures aphasia severity, not one region’s function.
Registration is scored on segmentation overlap and round trip, not on the lesions; the left pallidum (0.739) is the weakest structure.
Lesions pass through two normalisations (the authors’ to SPM12, then the mean brain to CDMD); a share is of cut voxels on this brain.
Code availability#
# 228 downloads, then SynthMorph and SynthSeg on the CPU; needs FreeSurfer 8.2
uv run python scripts/register_stroke_cases.py --anatomy cdmd --record
uv run python -m brain_model.build --anatomy cdmd
uv run python -m brain_model.validate --anatomy cdmd
uv run pytest tests/test_stroke_cases.py
npm test --prefix web
Figure state (open Stroke cases for panel a): https://planumatlas.com/#anatomy=cdmd&atlas=destrieux®ion=destrieux:left:4&cases=M2295,M2272