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.
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: