Digital PathologySolutions
Blog

Engineering a multi-scale tissue viewer that feels instant

How we built a whole-slide image viewer that renders gigapixel pathology data at 60fps on commodity hardware.

Marek KowalskiCTO & Co-founder
8 min read
Developer workstation with a code editor on one monitor and a pathology slide viewer interface on the other

A typical histopathology whole-slide image is between two and six gigapixels. Loaded naively, the file is larger than most browsers will even open. The challenge of a pathology viewer is not rendering fidelity, it is making an enormous file feel as responsive as Google Maps.

The tile pyramid

Every modern whole-slide format, from SVS to NDPI to MRXS, stores the image as a pyramid of tiles at progressively lower resolutions. The viewer's job is to fetch the right tiles at the right zoom level, decode them, and stitch them into the visible viewport while the user pans or zooms.

This is well-known territory. What is less obvious is the latency budget. A 60fps pan means fourteen milliseconds per frame for network fetch, JPEG decode, GPU upload, and composite. Break that budget and the user feels it instantly.

Three optimizations that moved the needle

  1. Predictive tile prefetching that follows the direction of the user's pan.
  2. Decoded-tile caching in a GPU-backed texture atlas instead of re-decoding per frame.
  3. Zoom-aware tile requesting — when the user is mid-zoom, we avoid requesting tiles at levels they will pass through.

Individually none of these are novel. Together they cut our ninety-ninth percentile frame time from forty-two milliseconds to under nine. The viewer now feels indistinguishable from a local image at any zoom level on any reasonable internet connection.

Performance is the feature pathologists notice first and stop noticing last. Get it right once and you stop having to defend it.

What is next

We are working on a WebGPU path that lets us push per-tile colormap adjustments, immunohistochemistry channel unmixing, and AI annotation overlays onto the GPU instead of rerunning them on every frame in JavaScript. Early numbers are promising. We will write about it once the rollout is complete.

Share this post

Written by

Marek Kowalski

CTO & Co-founder

You may also like.

Stay in the loop.

Subscribe or reach out and we’ll get back to you within one business day.

Digital Pathology Solutions is committed to protecting your privacy. We use your personal data solely for managing your inquiry and providing the information you requested.

Learn more in our Privacy Policy.

By clicking "Submit", you consent to Digital Pathology Solutions storing and processing the personal data you have provided above in order to deliver the requested content to you.

I'm not a robot
reCAPTCHA