openslide-prop2json

2.0.0 • Public • Published

openslide-prop2json

NPM Version Linux Build Windows Build
bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code

js-semistandard-style

Parse OpenSlide properties (generated by openslide-show-properties) to JSON.
It will also automatically convert number and boolean fields.

List of Known Properties
Virtual slide formats understood by OpenSlide

Install

npm install openslide-prop2json -g  # CLI 
npm install openslide-prop2json     # as module 

Usage

CLI

# load properties file 
openslide-show-properties Leica-1.scn > Leica-1.prop
openslide-prop2json Leica-1.prop
# OR with a pipe 
openslide-show-properties Leica-1.scn | openslide-prop2json

As Module

const prop2json = require('openslide-prop2json');
prop2json(inputStream, options, (err, prop) => {
  console.log(JSON.stringify(prop, null, 2));
});

Debug logs

Supported DEBUG tags: osp2j:parse, osp2j:transform.
See visionmedia/debug for details.

TODO

  • [transform.js] transform openslide.level[] as array
  • [convert.js] add blacklist for field conversion

Readme

Keywords

none

Package Sidebar

Install

npm i openslide-prop2json

Weekly Downloads

27

Version

2.0.0

License

MIT

Last publish

Collaborators

  • leesei