neuron_morphology.morphology_builder module

class neuron_morphology.morphology_builder.MorphologyBuilder[source]

Bases: object

Attributes:
active_node_id
next_id
parent_id

Methods

apical_dendrite(self[, x, y, z, radius]) Convenvience for creating an apical dendrite node.
axon(self[, x, y, z, radius]) Convenvience for creating an axon node.
basal_dendrite(self[, x, y, z, radius]) Convenvience for creating a basal dendrite node.
build(self) Construct a Morphology object using this builder.
child(self, x, y, z, node_type[, radius]) Add a child node to the current active node.
root(self[, x, y, z, node_type, radius]) Add a new root node (parent -1) to this reconstruction.
up(self[, by]) Terminate a branch.
active_node_id
apical_dendrite(self, x=None, y=None, z=None, radius=1)[source]

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

axon(self, x=None, y=None, z=None, radius=1)[source]

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

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

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

build(self)[source]

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

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

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

next_id
parent_id
root(self, x=0, y=0, z=0, node_type=1, radius=1)[source]

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

up(self, by=1)[source]

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