Gigapixel pathology slides on any phone or laptop, with no downloads and no licensed desktop software.
Project Summary
- Client: The Pathology Network
- Industry: healthcare
- My role: Lead Developer
- Core tasks: Viewer design, Image tiling algorithm, Web app development
- Appointed date: May 2021
- Completion: Aug 2021
A single digitised pathology slide can be a gigabyte or more: one image tens of thousands of pixels wide. Before this project, TPN's pathologists had to download each file from a shared drive and open it at a desktop workstation with licensed viewing software. Away from that desk, they couldn't report.
The problem
- Huge files. At 1GB+ per slide, downloading every case was slow and impractical.
- Tied to one machine. Reporting required a specific workstation with paid software installed.
- Off-the-shelf tools didn't fit. Existing products couldn't slot into TPN's workflow.
What I built
A whole-slide image viewer that runs in any modern browser, on a phone or a large monitor:
- Smooth deep zoom. Pan and zoom from the whole slide down to cellular detail without waiting for the full image.
- Mobile-ready controls. Pinch-to-zoom, a navigator minimap and touch-friendly controls for reviewing on the go.
- Open from a link. Slides open straight from a case, with no file transfer.
Under the hood
The key is never to send the whole image. Each slide is pre-processed into a multi-resolution pyramid of small tiles, and the viewer requests only the tiles visible at the current zoom level. Memory use stays flat, and a 1GB slide feels as responsive as a map app, even on modest hospital bandwidth.
The result
Pathologists and clinicians can now review slides anywhere, on whatever device is at hand. The viewer has served 150+ users and 1,000+ slide views, and it ended TPN's dependence on licensed desktop software.
Tech stack
- JavaScript
- OpenSeadragon
- HTML5 Canvas
- Python
- OpenSlide
- Deep Zoom (DZI) tile pyramids
What I did
- Designed and built the viewer from scratch
- Developed the tiling and zoom approach for 1GB+ slides
- Optimised rendering for both mobile and desktop browsers
Key decisions
- A browser-based viewer instead of desktop software, to remove licensing costs and widen access
- Pre-generated tile pyramids, so only visible tiles are ever downloaded
Challenges
- Rendering 1GB+ images in a browser without crashing
- Smooth zoom and pan at high resolution
- Supporting everything from phones to desktops
Have a similar problem to solve? Let's talk.
Start a conversation