neuron_morphology.morphology_builder

Module Contents

Classes

MorphologyBuilder
class neuron_morphology.morphology_builder.MorphologyBuilder
next_id
parent_id
active_node_id
up(self, by=1)

Terminate a branch. Set the active node to the previous active node’s ancestor.

Parameters:
by : how far (up the tree) to set the new active node. Default is the

parent of the current node (1). 2 would correspond to the

root(self, x=0, y=0, z=0, node_type=SOMA, radius=1)

Add a new root node (parent -1) to this reconstruction. This will be the new active node.

child(self, x, y, z, node_type, radius=1)

Add a child node to the current active node. This will become the new active node.

_add_node(self, x, y, z, node_type, radius)

Add a new node to this morphology.

Parameters:
x : x coordinate of this node’s position
y : y coordinate of this node’s position
z : z coordinate of this node’s position
node_type : one of AXON, SOMA, APICAL_DENDRITE, BASAL_DENDRITE
radius : describe the size of this node
axon(self, x=None, y=None, z=None, radius=1)

Convenvience for creating an axon node. Will not create a root.

apical_dendrite(self, x=None, y=None, z=None, radius=1)

Convenvience for creating an apical dendrite node. Will not create a root.

basal_dendrite(self, x=None, y=None, z=None, radius=1)

Convenvience for creating a basal dendrite node. Will not create a root.

build(self)

Construct a Morphology object using this builder. This is a non- destructive operation. The Morphology will be validated at this stage.