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
npm install openslide-prop2json -g # CLI
npm install openslide-prop2json # as module
# 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
const prop2json = require('openslide-prop2json');
prop2json(inputStream, options, (err, prop) => {
console.log(JSON.stringify(prop, null, 2));
});
Supported DEBUG tags: osp2j:parse, osp2j:transform.
See visionmedia/debug for details.
- [
transform.js
] transformopenslide.level[]
as array - [
convert.js
] add blacklist for field conversion