neurom.core.types¶
Type enumerations.
Module Attributes
Collection of all neurite types |
Functions
|
Select only axons. |
Select only dendrites. |
|
|
Check that the given type is composite. |
|
Tree type checker functor. |
Classes
|
Neurite iteration orders. |
|
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, names=None, *, module=None, qualname=None, type=None, start=1)¶
Type of neurite.
- is_composite()¶
Return True if the type consists of more than 1 subtypes.
- neurom.core.types.axon_filter(n)¶
Select only axons.
- neurom.core.types.dendrite_filter(n)¶
Select only dendrites.
- neurom.core.types.is_composite_type(subtype)¶
Check that the given type is composite.
- neurom.core.types.tree_type_checker(*ref)¶
Tree type checker functor.
- Parameters:
*ref (NeuriteType|tuple) – Either a single NeuriteType, list of them or a tuple of them.
- 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, iter_neurites >>> m = neurom.load_morphology("tests/data/swc/Neuron.swc") >>> >>> tree_filter = tree_type_checker(NeuriteType.axon, NeuriteType.basal_dendrite) >>> it = iter_neurites(m, filt=tree_filter) >>> >>> tree_filter = tree_type_checker((NeuriteType.axon, NeuriteType.basal_dendrite)) >>> it = iter_neurites(m, filt=tree_filter)