SWC Visualizer
SWC Visualizer is a Python tool for validating, summarizing, and visualizing neuronal morphology stored in SWC files.
It is designed for people who are new to neuronal morphology and/or programming, who want to explore SWC files from databases such as NeuroMorpho.Org or other sources.
The tool can:
- Validate SWC morphology data.
- Provide basic summary information about neuronal morphology.
- Generate 2D visualizations of neuronal morphology.
- Generate interactive 3D visualizations of neuronal morphology.
- Process SWC files individually or. process all SWC files in a directory sequentially.
Example
Installation
Install SWC Visualizer from PyPI:
pip install swc-visualizer
Basic Usage
After installing the package, import and call visualize_swc
from swc_visualizer import visualize_swc
visualize_swc("my/neuron/folder", visualization="3d")
The visualization argument accepts:
- "2d" — generate a 2D visualization.
- "3d" — generate a 3D visualization.
- "both" — generate both 2D and 3D visualizations.
You can provide either an individual SWC file or a directory containing multiple SWC files:
from swc_visualizer import visualize_swc
# Process a single SWC file
visualize_swc("my/neuron.swc", visualization="2d")
# Process all SWC files in a directory
visualize_swc("my/neuron_folder", visualization="both")
Command Line
SWC Visualizer can also be used directly from the command line.
Provide the path to an individual SWC file or a directory containing SWC files, and a visualization type using --visualization. For example:
swc-visualizer my/neuron.swc --visualization 2d
or
swc-visualizer my/neuron_folder --visualization both
Example SWC Files
Example SWC files are included with the package and can be accessed using "examples":
from swc_visualizer import visualize_swc
visualize_swc("examples", visualization="3d")
From the command line, use the --examples flag:
swc-visualizer --examples
Acknowledgements
Special thanks to Marieke Westendorp for her guidance throughout this project.
License
This project is licensed under the MIT License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swc_visualizer-0.1.2.tar.gz.
File metadata
- Download URL: swc_visualizer-0.1.2.tar.gz
- Upload date:
- Size: 575.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c1f5af60802b521b0a6f84e01111032804160b509e7f741cb81746c14b7a102
|
|
| MD5 |
c8820a71476021ee0f636b0429041db7
|
|
| BLAKE2b-256 |
8696fa1157c71acba8d474b0c4bd3d4b03b419f395dbb1bb43fa88d711869741
|
Provenance
The following attestation bundles were made for swc_visualizer-0.1.2.tar.gz:
Publisher:
python-publish.yml on danieljosemoca/swc-visualizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swc_visualizer-0.1.2.tar.gz -
Subject digest:
8c1f5af60802b521b0a6f84e01111032804160b509e7f741cb81746c14b7a102 - Sigstore transparency entry: 2518914601
- Sigstore integration time:
-
Permalink:
danieljosemoca/swc-visualizer@b6b0e0de977aa053ef60c1f2dd93a7a0e1802bf0 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/danieljosemoca
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b6b0e0de977aa053ef60c1f2dd93a7a0e1802bf0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file swc_visualizer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: swc_visualizer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 575.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e63b3447ad79a9f836dfa172458b78feeef30c8594023bfae5af7e42d407a6b9
|
|
| MD5 |
186c7a36e3d0e5f4e9ca43ce8b7da204
|
|
| BLAKE2b-256 |
41f72036ad8883ad359071a7b67532aa19476091329255bc94ef304ae58c0018
|
Provenance
The following attestation bundles were made for swc_visualizer-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on danieljosemoca/swc-visualizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swc_visualizer-0.1.2-py3-none-any.whl -
Subject digest:
e63b3447ad79a9f836dfa172458b78feeef30c8594023bfae5af7e42d407a6b9 - Sigstore transparency entry: 2518914684
- Sigstore integration time:
-
Permalink:
danieljosemoca/swc-visualizer@b6b0e0de977aa053ef60c1f2dd93a7a0e1802bf0 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/danieljosemoca
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b6b0e0de977aa053ef60c1f2dd93a7a0e1802bf0 -
Trigger Event:
release
-
Statement type: