https://github.com/leesei/openslide-prop2json
Parse OpenSlide properties (generated by `openslide-show-properties`) to JSON
https://github.com/leesei/openslide-prop2json
json openslide
Last synced: about 1 month ago
JSON representation
Parse OpenSlide properties (generated by `openslide-show-properties`) to JSON
- Host: GitHub
- URL: https://github.com/leesei/openslide-prop2json
- Owner: leesei
- License: mit
- Created: 2015-12-01T05:00:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-27T05:28:50.000Z (almost 8 years ago)
- Last Synced: 2025-03-09T03:51:22.007Z (over 1 year ago)
- Topics: json, openslide
- Language: JavaScript
- Homepage:
- Size: 62.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openslide-prop2json
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Windows Build][appveyor-image]][appveyor-url]
[](https://github.com/prettier/prettier)
[npm-image]: https://img.shields.io/npm/v/openslide-prop2json.svg
[npm-url]: https://npmjs.org/package/openslide-prop2json
[travis-image]: https://img.shields.io/travis/leesei/openslide-prop2json.svg?label=linux
[travis-url]: https://travis-ci.org/leesei/openslide-prop2json
[appveyor-image]: https://img.shields.io/appveyor/ci/leesei/openslide-prop2json/master.svg?label=windows
[appveyor-url]: https://ci.appveyor.com/project/leesei/openslide-prop2json
Parse OpenSlide properties (generated by `openslide-show-properties`) to JSON.
It will also automatically convert number and boolean fields.
[List of Known Properties](http://openslide.org/docs/properties/)
[Virtual slide formats understood by OpenSlide](http://openslide.org/formats/)
## Install
```sh
npm install openslide-prop2json -g # CLI
npm install openslide-prop2json # as module
```
## Usage
### CLI
```sh
# 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
```js
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](https://github.com/visionmedia/debug/) for details.
## TODO
- [`transform.js`] transform `openslide.level[]` as array
- [`convert.js`] add blacklist for field conversion