-
Notifications
You must be signed in to change notification settings - Fork 7
Neuron
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.
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.
The high-level methods are described here, the rest are covered in the API section.
- update - Updates the annotation data by re-importing from the Viking database
% Syntax: NEURON.update();
- 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
- getSomaSize - Returns the radius (in microns) of the single largest annotation in the neuron, assumed to be the soma.
somaSize = obj.getSomaSize();
-
render - 3D render of the neuron, read more at the visualization page.
-
dae - export as .dae file, read more at the visualization page.