Parallax Pathology · Technical note
Russell Parrish · Version 1, 5 November 2026
The Macenko method [1] estimates the two stain directions of an H&E image from the data. Pixels are converted to optical density (OD), clearly stained pixels are kept, and the plane spanned by the first two singular vectors of the OD matrix is found. Each pixel is projected onto that plane and given an angle; the stain vectors are taken at robust extremes of the angle distribution (here the 1st and 99th percentiles). Singular vectors are defined only up to sign. If the first vector points into negative OD, the angles cluster near ±180° instead of near 0°, and the percentile extremes can fall on opposite sides of the wrap while describing nearly the same direction. Established implementations correct the sign before taking angles [5–7]. A hand-written version that omits this step still runs without error.
Tiles. Tumour-region tiles of TCGA-COAD diagnostic slides from Zenodo 3784345 [4] (512 px, unnormalised JPEG). The historical analysis table holds 9,010 tiles from 182 patients in two forms made from the same tiles: unnormalised, and after the historical normaliser. Patients were grouped by image production route, read from public slide headers and tile coordinates [8]: AA regular (95 patients; site AA, Indivumed, MIRAX scans converted to SVS at 0.2325 µm/px), AA derivative (15; small, low-resolution derivative files) and other sites (71, from sites A6, AZ, AY, 5M and 4T; Aperio scans at about 0.25 µm/px). One further AA patient had no recorded tile grid and is not in any group.
Normaliser. The class was copied with unchanged logic from the notebook that wrote the historical table, and its reference tile was reconstructed as the notebook chose it (one tile of patient TCGA-AA-3710, drawn with a fixed seed). To test whether the step itself reproduces the table, it was applied to newly drawn random tiles (96–120 per group).
Measurements and statistics. All new measurements use the frozen Parallax Historical58 release; the historical tables were made with the notebook-era code, and the release reproduces sampled rows of the unnormalised table to within 7 × 10−10. Group contrasts are Cohen's d at patient level, with permutation p-values (20,000 shuffles) and AUC. Sharpness is the variance of the Laplacian. No clinical or outcome data were used.
| Stain matrix | Angle between H and E |
|---|---|
| Historical reference (no sign check) | 0.17° |
| Same tile, standard sign check added | 14.5° |
| Corrected target in the frozen release | 14.4° |
| Textbook H and E OD vectors (Ruifrok and Johnston [2]) | 39.4° |
The historical target's two rows are (0.538, 0.797, 0.275) and (0.536, 0.799, 0.274): one direction, lying 8.5° from textbook H and 31° from textbook E. A two-stain model with no second stain makes the per-tile concentration solve ill-conditioned, and every normalised tile is re-rendered from essentially one colour direction.
| Group | Tiles | H/E angle, median | Share under 2° | Condition number, median | Angle with a corrected estimator |
|---|---|---|---|---|---|
| AA regular | 96 | 0.13° | 100% | 868 | 14.0° |
| AA derivative | 120 | 0.15° | 96% | 750 | 15.8° |
| Other sites | 96 | 0.17° | 100% | 676 | 14.8° |
The corrected estimator here adds mean-centring, which also removes the wrap; the sign check alone gives a comparable result (14.5°) on the reference tile.
| Group means | AA regular | AA derivative | Other sites |
|---|---|---|---|
| Ω, historical table | 0.031 | 0.064 | 0.042 |
| Ω, copied normaliser on new tiles | 0.034 | 0.065 | 0.044 |
| Ω, same new tiles, unnormalised | 0.047 | 0.051 | 0.040 |
| Luminance-chromatic disagreement Δr, historical table | 0.158 | 0.062 | 0.126 |
| Δr, copied normaliser on new tiles | 0.162 | 0.061 | 0.131 |
| Highlight mass, historical table | 0.53 | 0.34 | 0.49 |
| Highlight mass, copied normaliser on new tiles | 0.52 | 0.33 | 0.52 |
The normaliser lowers Ω on AA regular tiles and raises it on the other two groups, reversing the raw order of AA regular and other sites.
| Contrast (Cohen's d, permutation p) | Unnormalised table | Historical normalised table |
|---|---|---|
| Mean Ω, AA regular vs other sites | +0.15 (0.33) | −1.25 (<0.0001) |
| SD of Ω, AA regular vs other sites | −0.07 (0.66) | −1.31 (<0.0001) |
| Mean Ω, AA derivative vs AA regular | +0.69 (0.015) | +3.70 (<0.0001; AUC 1.00) |
| Highlight mass, AA regular vs other sites | +1.25 (<0.0001) | +0.41 (0.010) |
The site difference in Ω, and the near-perfect separation of the derivative patients, are created by the normalisation step. The raw images do differ between AA regular and other sites, but in tone, stain and texture (highlight mass, fine texture contrast, blob density), not in Ω; the derivative patients differ modestly in raw Ω as well (d +0.69). Normalisation also shrinks an existing tonal difference in highlight mass.
Every tile archive was written with the same JPEG quantisation table and chroma subsampling, so the export step was shared. Sharpness falls in a ladder: other sites (median Laplacian variance 1,107), AA regular (212, about five times lower), AA derivative (20). This is consistent with the scanner tags, a 20× objective stored at 0.2325 µm/px (oversampled, so optically soft) against 40× scans at about 0.25 µm/px, but it is not proven. In controlled emulations on wide-field tiles, Ω rose with almost any loss of fine detail per pixel, so Ω is resolution-sensitive and differences in production route can reach it directly.
This is a different normaliser, applied by the dataset's authors. On 300–400 expert-labelled tiles per class, the share of bright pixels (highlight mass) averages 0.99 for unnormalised background and 0.00 for author-normalised background; lymphocyte tiles average 0.14 and 0.38. The two sets are different tiles from different patients, so the comparison is indicative, but blank glass has no tissue to differ. Any tonal measure computed on a normalised set measures the normaliser's target as much as the tissue.
The historical normalised table was the input to earlier Parallax Pathology analyses of TCGA-COAD. Those analyses have been withdrawn from our pages and are being reported separately. Two specific consequences. The large site difference in Ω in that table, which an earlier claim had described as absent, comes from this step. And highlight mass had been set aside as a "staining proxy" because it weakened after normalisation, a judgement that rested on this step.
np.degrees(np.arccos(abs(h @ e) / np.linalg.norm(h) / np.linalg.norm(e))).Scripts, outputs and hashes are held by the authors (folders SITE_RESOLUTION_20261104, TCGA_PRODUCTION_ROUTES_20261104, TONAL_MECHANISM_20261104 and NORMALISER_NOTE_20261105) and are available on request. Only public image data were used. Analysis carried out with AI assistants.