@eozin/eozin-node
v0.1.0-alpha.1
Published
Digital pathology image decoder
Readme
Eozin JavaScript: The dye-namic solution for digital pathology
Eozin is a pure-Rust decoder library for digital pathology. The library provides high-performance, efficient access to individual tiles within large pathology images, enabling seamless integration into web and server-side workflows. The name is inspired by eosin, a fundamental dye used in medical diagnosis.
Packages
Depending on your environment, use the appropriate package:
- @eozin/eozin-web: Optimized for browser environments using WebAssembly.
- @eozin/eozin-node: Tailored for Node.js and Bun with native performance.
@eozin/eozin-node (Node.js / Bun)
For server-side applications, @eozin/eozin-node provides direct access to the local file system for optimal performance.
import { Eozin } from '@eozin/eozin-node';
// 1. Open the slide.
let slide = await Eozin.withPath("/some/slide.svs");
console.log(slide.dimensions);
console.log(slide.slideFormat);
// 2. Read a specific tile (Level 0, X: 5, Y: 6).
let tile = await slide.readTile(0, 10, 10);
assert.strictEqual(tile.mimeType, "image/jpeg");
// 3. Save tile buffer to a file.
let buf = tile.toUint8Array();
fs.writeFileSync("tile_lv0_x10_y10.jpeg", tile.toUint8Array());Notes
Vendor and file format names mentioned in this library are the property of their respective owners. This library is not certified for clinical use.
