BIF: reduced pyramid levels stitch-aligned with L0 — DP + legacy iScan (#83, #80)
BIF reduced pyramid levels (DP and legacy iScan) are stitch-aligned with L0
(#83, #80).
Fixed
- BIF reduced levels (L1+) now composite stitch-aligned with L0 (#83 DP, #80
legacy iScan). The scanner stores reduced levels as the raw (un-compacted) frame
grid downsampled, so their pixels carried the frame overlap (DP:~overlap/2ⁱ
residual at the frame-join seams — ~60px at L1 on Ventana-1, halving each deeper
level; legacy iScan: dense ~11%). v0.53.0 corrected only DP's reported
Level.Size; the layout stayed naive (and legacySizestayed the raw frame
grid), so a region /StitchedTileread crossing the L0↔L1 boundary still showed
a content shift. Reduced levels now build their stitch layout by downsampling
the L0 compacted layout (reduced tile(col,row)inherits L0 frame
(col<<i, row<<i)'s compacted origin, scaled by1/2ⁱ) and report
Level.Overlapping = true, so the existingregionLayout/compositeStitchedLoop
path composites them with no compositor change. Legacy reducedSizenow derives
from the L0 stitched hull (floor-halved) too — matching openslide's L1 content
extent within ~0.1% (OS-1 L152909vs openslide~52907), closing the
#78-legacy deferral.Gridand tile bytes are unchanged.
Changed
- BIF reduced levels now report
Level.Overlapping = true(wasfalse) for DP
and legacy iScan slides whose L0 was overlap-compacted. Consumers that gate
per-tile fast paths onOverlapping(the documented #71 contract) automatically
route reduced-level pixel reassembly through the region API and get the
stitch-aligned output. Consumers that ignoredOverlappingand iteratedGridon
reduced levels were already mis-stitching; they should adopt the contract. - Legacy iScan reduced-level
Level.Size/Downsamplechanged to the stitched
(floor-halved-hull) content extent (e.g. OS-1 L159392×51000→52909×46962).
This is the openslide-matching value (within ~0.1%); the prior raw-frame-grid
dimensions overstated the content. Tile bytes andGridare unchanged.