Skip to main content

SWC to VTK converter for visualize multi-compartment neurons and neural circuit simulations

Project description

travisci Coverage Status python-2.7,3.3,3.4-blue license paraview NEURON

SWC to VTK converter for visualizing neurons and neural circuit simulations in ParaView. This software helps making beautiful visualization of large scale multi-compartmental neuron simulations with a parallelized environment. If you need any further information, please check http://daisukemiyamoto.github.io/swc2vtk/ .

Dependency

  • tqdm

  • numpy

  • [STRIKEOUT:PyVTK]

Install

  • $ pip install swc2vtk

Usage

Basic way to generate VTK file from one SWC file

import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.write_vtk('simple.vtk')

generate a VTK file from multiple SWC files

import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_swc('simple1.swc')
vtkgen.add_swc('simple2.swc')
vtkgen.write_vtk('combined.vtk')

generate a VTK file from SWC file with simulation data

import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_datafile('result.dat')
vtkgen.write_vtk('simple.vtk')
  • data example
    each rows correspondence to SWC compartments
    -65.0
    -65.0
    -65.0
    -65.0

generate VTK files from SWC file with sequential simulation data

import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')

vtkgen.add_datafile('result1.dat')
vtkgen.write_vtk('simple1.vtk')

vtkgen.clear_datafile()
vtkgen.add_datafile('result2.dat')
vtkgen.write_vtk('simple2.vtk')

vtkgen.clear_datafile()
vtkgen.add_datafile('result3.dat')
vtkgen.write_vtk('simple3.vtk')

Output Examples

Single Neuron Morphology

single

single

Coloring Multiple SWC Files

Coloring

Coloring

Single Neuron Simulation

Neural Circuit Simulation

Volume Rendering

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swc2vtk-1.1.0.tar.gz (12.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page