Skip to main content

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

See docs/3d_visualizer_example.png And docs/2d_visualizer_example.png

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

swc_visualizer-0.1.2.tar.gz (575.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swc_visualizer-0.1.2-py3-none-any.whl (575.4 kB view details)

Uploaded Python 3

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

Hashes for swc_visualizer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8c1f5af60802b521b0a6f84e01111032804160b509e7f741cb81746c14b7a102
MD5 c8820a71476021ee0f636b0429041db7
BLAKE2b-256 8696fa1157c71acba8d474b0c4bd3d4b03b419f395dbb1bb43fa88d711869741

See more details on using hashes here.

Provenance

The following attestation bundles were made for swc_visualizer-0.1.2.tar.gz:

Publisher: python-publish.yml on danieljosemoca/swc-visualizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for swc_visualizer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e63b3447ad79a9f836dfa172458b78feeef30c8594023bfae5af7e42d407a6b9
MD5 186c7a36e3d0e5f4e9ca43ce8b7da204
BLAKE2b-256 41f72036ad8883ad359071a7b67532aa19476091329255bc94ef304ae58c0018

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page