Betti grid explorer

The core computation of TopoCon-MP on a made-up 64 × 64 lesion, for the Tastan et al. 2026 notes. A pixel is switched on when its red value is at most s and its green value is at most t; the heatmaps record islands, holes and switched-on pixels at all 20 × 20 threshold pairs, which is the paper's 3 × 20 × 20 "topological image".

Lesion

lesion (dark = low red and green)

pixels with R ≤ s and G ≤ t

along red only (green fixed at t)

Islands β₀0
Holes β₁0
Pixels switched on0

β₀ over the 20 × 20 grid (click to move)

β₁ over the 20 × 20 grid

pixels on over the grid

Heatmaps: red threshold left → right, green threshold bottom → top; brighter means a larger count. The red square marks the current pair.

Things to try

  1. Compact lesion, slide red upwards. One island appears in the dark centre and grows; at high thresholds the background floods in. β₀ stays small, holes are rare, and the heatmaps show one tidy block.
  2. Switch to the irregular lesion. Many islands appear at middle thresholds and enclosed gaps show up as holes; the heatmaps spread out with hotspots in particular red–green combinations.
  3. Compare a row with the grid. The curve panel is one row of the grid; the full grid keeps cross-channel information the row loses.
  4. Press "New random seed". Exact counts move, but the overall shape of the heatmaps is fairly stable.

Each grid cell is computed independently, by counting islands (8-connected foreground) and holes (4-connected background regions not touching the border) in that one mask. Nothing links an island at one pair to the same island at the next, so this is the Hilbert function of the bifiltration, not persistence. The heatmap axes are colour thresholds, not image positions. The lesions are synthetic and only illustrate the computation.