@annotorious/plugin-magnetic-outline
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Annotorious Magnetic Outline Tools

A plugin for Annotorious that adds two smart polygon drawing tools:

  • Magnetic Cursor. Makes the mouse cursor snap to corner points of nearby objects detected in the image.
  • Intelligent Scissors. A Photoshop-style intelligent scissors tools for tracing the outlines of objects in the image.

Important: this plugin only supports @annotorious/openseadragon at this time. Support for plain (JPEG, PNG,...) images is not yet implemented. Get in touch via the forum if you are interested in using this with the @annotorious/annotorious or @annotorious/react packages.

Usage

npm install @annotorious/plugin-magnetic-outline
import OpenSeadragon from 'openseadragon';
import { createOSDAnnotator } from '@annotorious/openseadragon';
import { mountPlugin } from '@annotorious/plugin-magnetic-outline';

import '@annotorious/openseadragon/annotorious-openseadragon.css';

// ...

const viewer = OpenSeadragon({
  // init OSD viewer normally  
});

const anno = createOSDAnnotator(viewer, {
  // init Annotorious for OSD normally
});

// Will mount the plugin and register
// both drawing tools.
mountPlugin(anno);

anno.setDrawingTool('magnetic-cursor'); // or 'intelligent-scissors'

Readme

Keywords

none

Package Sidebar

Install

npm i @annotorious/plugin-magnetic-outline

Weekly Downloads

10

Version

0.1.4

License

BSD-3-Clause

Unpacked Size

67.4 MB

Total Files

24

Last publish

Collaborators

  • aboutgeo