This plugin introduces a lens to the OpenSeadragon viewer with several characteristic features, including hi-res magnification, physical measurements, exportable snapshots, customized overlays, and localized filtering. The overlays and filters in particular can be extended to support application-specific tasks.
- npm -
npm i lensing
- github -
git clone [email protected]:jessupjs/lensing.git
-
Install w NPM
-
Import at top of .js:
import * as osd from 'openseadragon'; import * as l from 'lensing';
-
After original OSD viewer is instantiated, construct the lensing hidden viewer:
// Instantiate viewer const viewer = osd(viewer_config); // Compile dataLoad, i.e. custom filters (empty by default) const dataLoad = [] // Instantiate Lensing viewer.lensing = l.construct(osd, viewer, viewer_config, dataLoad);
-
Refer to the following examples if useful:
- Lensing Demo - a small application that demonstrates the lensing tool's core functionalities.
- Scope2Screen - a domain-specific application (digital histopathology) that presents examples for extending functionality with custom filters and annotations.