/** * openslide.ts * * Main entry point for the library. Manages a pool of Web Workers, * each running an independent WASM instance. Distributes work * across workers for parallel tile reads. */ import type { OpenSlideOptions, SlideSource } from './types.js'; import { Slide } from './slide.js'; export declare class OpenSlide { private workers; /** Shared I/O broker worker (block cache + async fetch), if enabled. */ private broker; private nextId; private terminated; private constructor(); /** * Create and initialize an OpenSlide instance with a worker pool. * * @param options.workerCount - Number of workers (default: hardwareConcurrency or 4). * @param options.wasmUrl - Custom URL to the WASM module JS loader. */ static initialize(options?: OpenSlideOptions): Promise; /** * Open a whole-slide image. * * Accepts: * - A single File (dropped or from file input) * - An array of Files (for multi-file formats like MIRAX) * - An array of VirtualFile objects (files with relative paths) * - A URL object or string URL (fetched via HTTP range requests) */ open(source: SlideSource): Promise; /** * Detect the vendor of a slide file without fully opening it. * Returns the vendor string (e.g., "aperio", "hamamatsu") or null. */ detectVendor(source: SlideSource): Promise; /** Get the OpenSlide library version string. */ getVersion(): Promise; /** Terminate all workers (including the I/O broker). The instance cannot be used after this. */ terminate(): void; private leastBusy; private sendTo; private createSendFn; private generateMountId; private ensureAlive; } //# sourceMappingURL=openslide.d.ts.map