A minimal napari plugin to load swc file to napari viewer.
This napari plugin was generated with copier using the napari-plugin-template.
- Load swc file(s) to napari viewer
- Display swc file(s) in napari viewer as points layers and lines layers
- Size of points and lines are using the radius of the swc file
- You can load an example swc from https://neuromorpho.org/dableFiles/jacobs/CNG%20version/204-2-6nj.CNG.swc or load it under
File
->Open Sample
->napari-swc-reader
Limitations:
- Only support swc file(s) following specs http://www.neuronland.org/NLMorphologyConverter/MorphologyFormats/SWC/Spec.html 7 columns
- Cannot write swc file(s) to disk but you can access the raw swc data from the napari layers from
metadata
attribute with keyraw_swc
Roadmap:
- Switch to use
napari.layers.Graph
when it is available
You can install napari-swc-reader
via pip:
pip install napari-swc-reader
To install latest development version :
pip install git+https://github.com/LaboratoryOpticsBiosciences/napari-swc-reader.git
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "napari-swc-reader" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.
Checkout this cool other ressources working with swc files and napari: