wsi-rs
wsi-rs is a Rust whole-slide image reader. It opens TIFF-family WSI,
DICOM VL WSI, Zeiss CZI/ZVI, MIRAX, Hamamatsu VMS/VMU, Olympus VSI/ETS, raw
JPEG 2000 codestream fixtures, and .svcache containers. JPEG, JPEG 2000,
and HTJ2K decode is delegated to the j2k-* crates.
The main crate forbids unsafe code.
Unsupported or incomplete sources return WsiError; they should not silently
produce black or partial pixels.
Install
Quick Start
use ;
Use SlideOpenOptions for explicit cache budgets, read-through .svcache
lookup, custom registries, region limits, or decode execution settings.
Build cache files with:
Supported Inputs
| Input family | Typical paths |
|---|---|
| TIFF-family WSI | .svs, .tif, .tiff, .ndpi, .scn, .bif |
| DICOM VL WSI | .dcm files or a DICOM series directory |
| Zeiss | .czi, .zvi |
| MIRAX | .mrxs plus sibling data files |
| Hamamatsu VMS/VMU | .vms, .vmu plus sibling image files |
| Olympus VSI | .vsi plus matching ETS companion data |
| Raw JPEG 2000 codestream | .j2k, .j2c |
.svcache |
.svcache |
Features
| Feature | Default | Description |
|---|---|---|
metal |
off | Metal-backed device payloads on macOS. |
cuda |
off | CUDA-backed payload surface. |
parity-openslide |
off | OpenSlide oracle parity tests. |
parity-metal |
off | Metal parity checks on macOS. |
OpenSlide Compatibility Shim
The workspace includes wsi-rs-openslide-shim, a C ABI library that exports
OpenSlide-compatible symbols and routes reads through wsi-rs.
Use .so instead of .dylib on Linux. Test in a private prefix before
replacing any system OpenSlide library.
Development
cargo xtask validate runs the default local gate.
cargo xtask rc-preflight runs API checks, supply-chain checks, fuzz target
type-checking, feature-combination checks, validation, and package dry-run
checks.
Security
Report vulnerabilities privately through GitHub private vulnerability reporting or the repository owner profile.
License
Apache-2.0. See LICENSE.