neurom.core.types¶
Type enumerations.
Module Attributes
Collection of all neurite types |
Functions
|
Select only axons. |
Select only dendrites. |
|
|
Tree type checker functor. |
Classes
|
Neurite iteration orders. |
|
Type of neurite. |
- neurom.core.types.NEURITES = (<NeuriteType.axon: 2>, <NeuriteType.apical_dendrite: 4>, <NeuriteType.basal_dendrite: 3>)¶
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)