neurom.core.types

Type enumerations.

Module Attributes

NEURITES

Collection of all neurite types

Functions

axon_filter(n)

Select only axons.

dendrite_filter(n)

Select only dendrites.

tree_type_checker(*ref)

Tree type checker functor.

Classes

NeuriteIter(value)

Neurite iteration orders.

NeuriteType(value)

Type of neurite.

neurom.core.types.NEURITES = (NeuriteType.axon, NeuriteType.apical_dendrite, NeuriteType.basal_dendrite)

Collection of all neurite types

class neurom.core.types.NeuriteIter(value)

Neurite iteration orders.

class neurom.core.types.NeuriteType(value)

Type of neurite.

neurom.core.types.axon_filter(n)

Select only axons.

neurom.core.types.dendrite_filter(n)

Select only dendrites.

neurom.core.types.tree_type_checker(*ref)

Tree type checker functor.

Parameters:
  • *ref (NeuriteType|tuple) – Either a single NeuriteType or a variable list of them or a tuple

  • them. (of)

Returns:

Functor that takes a tree, and returns true if that tree matches any of NeuriteTypes in ref

Ex:
>>> import neurom
>>> from neurom.core.types import NeuriteType, tree_type_checker
>>> from neurom.core.morphology import Section
>>> m = neurom.load_morphology('path')
>>>
>>> tree_filter = tree_type_checker(NeuriteType.axon, NeuriteType.basal_dendrite)
>>> m.i_neurites(Section.ipreorder, tree_filter=tree_filter)
>>>
>>> tree_filter = tree_type_checker((NeuriteType.axon, NeuriteType.basal_dendrite))
>>> m.i_neurites(Section.ipreorder, tree_filter=tree_filter)