swcmorphologyparser

0.1.11 • Public • Published

SWC moprhology parser

An instance of SwcParser is made to parse SWC files with the given specification.
The data output by this parser is a Javascript object representing a the tree structure of the morphology. Each node of the tree is a section that contain a reference to its parent section and references to its children sections. The tree is given flat, meaning all the sections are at the same hierarchy level within the JS object and every section is identified by an arbitrary ID.

Example

let swcParser = new swcmorphologyparser.SwcParser()
swcParser.parse(data)
let rawMorpho = swcParser.getRawMorphology()

// if rawMorpho is null, then it mean the file was not a propper SWC

Where data is the sting content of a SWC file.

  • DEMO TEXT - Output a JSON of the morphology tree
  • DEMO 3D - Output a 3D morphology

Readme

Keywords

none

Package Sidebar

Install

npm i swcmorphologyparser

Weekly Downloads

80

Version

0.1.11

License

MIT

Unpacked Size

13.1 MB

Total Files

50

Last publish

Collaborators

  • jonathanlurie