Skip to content
Sara Patterson edited this page Sep 6, 2018 · 3 revisions

SBFSEM-tools revolves around the Neuron class, which corresponds to a Structure in Viking.

Import a neuron as follows:

% x = Neuron(ID, VOLUME_NAME, IMPORT_SYNAPSES)
c6800 = Neuron(6800, 't', true);
% Without synapses:
c2795 = Neuron(2795, 'i');

The 3rd argument is optional and defaults to false. Importing synapses (Child Structures in Viking) is time-consuming so only import them if needed. If a function involving synapses is called and you haven't already imported the synapses, they will be imported automatically.

Neuron is one of several subclasses of the NeuronAPI object. Standard use requires only the Neuron class, which provides up to date annotation information via OData queries. For information on the NeuronJSON and NeuronSWC classes, see the section on open source data.

Neuron Properties

The Neuron class has the following properties:

Property name Data type Description
viking struct Structure information from Viking
nodes table All annotations associated with neuron
edges table Links between annotations
volumeScale vector XYZ dimensions in nm/pixel, nm/pixel, nm/section
synapses table All child structures associated with neuron
geometries table All closed curve annotations in neuron
analysis containers.Map Contains NeuronAnalysis results
model struct, binary matrix Face/vertices for Disc annotations, binary mask volume for ClosedCurve
lastModified datestr Date and time of import from database

Here, I'll focus on the most important ones: nodes, edges and synapses.

Matlab provides a UI for looking through variables, accessed using the openvar function:

% Import a neuron
c1441 = Neuron(1441, 't', true)
% Open the variable UI
openvar('c6800')

From here you can see a list of properties. Click on nodes. The nodes property is a table (think Excel spreadsheet...) where each row is a single annotation (Location in Viking). Each annotation is distinguished by a unique Location ID, which makes up the first column. The second column is the ParentID, which should all be equal to the Neuron's ID. If you scroll to the bottom, you'll see the synapse locations associated.

More intuitive descriptions of the parent/child relationships can be found in the Viking Tutorial by Andrea Bordt in the Marshak Lab or the XML Schema.

Neuron Methods

The high-level methods are described here, the rest are covered in the API section.

  1. update - Updates the annotation data by re-importing from the Viking database
% Syntax: NEURON.update();
  1. printSyn - Prints a summary of the neuron's synapses. Returns two descriptions: the official Viking StructureTypes and then the detailed StructureTypes used by this program (see the Structure Types section here)
% Syntax: NEURON.printSyn();
c6800.printSyn
  1. getSomaSize - Returns the radius (in microns) of the single largest annotation in the neuron, assumed to be the soma.
somaSize = obj.getSomaSize();
  1. render - 3D render of the neuron, read more at the visualization page.

  2. dae - export as .dae file, read more at the visualization page.

Clone this wiki locally