Index ← Previous Topic Next Topic →

Importing Models

At any time after opening a dataset you may choose to import an existing model. Currently the only file format that can be imported is SWC. Select the menu item File >> Import SWC... to bring up the standard window for searching your file system. Find a file with the .swc extension and hit OK. A new section(s) of the model will be created if the file doesnt contain any errors.

SWC Format Details

IMPORTANT: The following information does NOT need to be known in order to open an SWC file using NeuronStudio.

The format of an SWC file is fairly simple. It is a text file consisting of a header with various fields beginning with a # character, and a series of three dimensional points containing an index, radius, type, and connectivity information. The lines in the text file representing points have the following layout.

n T x y z R P

n is an integer label that identifies the current point and increments by one from one line to the next.

T is an integer representing the type of neuronal segment, such as soma, axon, apical dendrite, etc.
   0 = undefined
   1 = soma
   2 = axon
   3 = dendrite
   4 = apical dendrite
   5 = fork point
   6 = end point
   7 = custom

x, y, z gives the cartesian coordinates of each node.

R is the radius at that node.

P indicates the parent (the integer label) of the current point or -1 to indicate an origin (soma).

IMPORTANT: Additional columns for each line of the file are allowed by the SWC specification but these are custom to a specific application. NeuronStudio uses two custom columns for the branch order and section number if the user chooses to output this information. See also Saving the Model.

An example file generated by NeuronStudio and containing just 8 points is shown below. Note that some of the fields of the header are missing values. At the time of this writing it is unclear whether this is allowed. NeuronStudio fills in SHRINKAGE_CORRECTION and SCALE with 1.0 in case a potential SWC reader uses these fields.

Additional fields can be appended on each line after the parent label that should be ignored by standard readers. NeuronStudio can optionally output section ID and branch order fields when the SWC file is written.

# ORIGINAL_SOURCE NeuronStudio 0.8.80
# CREATURE 
# REGION 
# FIELD/LAYER 
# TYPE 
# CONTRIBUTOR 
# REFERENCE 
# RAW 
# EXTRAS 
# SOMA_AREA 
# SHINKAGE_CORRECTION 1.0 1.0 1.0
# VERSION_NUMBER 1.0
# VERSION_DATE 2007-07-24
# SCALE 1.0 1.0 1.0

1 1 14.566132 34.873772 7.857000 0.717830  -1
2 0 16.022520 33.760513 7.047000 0.463378  1
3 5 17.542000 32.604973 6.885001 0.638007  2
4 0 19.163984 32.022469 5.913000 0.602284  3
5 0 20.448090 30.822802 4.860000 0.436025  4
6 6 21.897903 28.881084 3.402000 0.471886  5
7 0 18.461960 30.289471 8.586000 0.447463  3
8 6 19.420759 28.730757 9.558000 0.496217  7
Index ← Previous Topic Next Topic →
Send questions or comments to: alfredo.rodriguez@mssm.edu