neuroarch.na.NeuroArch.add_morphology
- NeuroArch.add_morphology(obj, morphology, data_source=None)[source]
Add a morphology to a node, e.g., a neuropil, or a neuron.
- Parameters:
obj (models.BioNode or subclass) – An instance of BioNode class, e.g., Neuropil, Neuron, etc… to which the morphology will be associated to
morphology (list of dict (optional)) – Each dict in the list defines a type of morphology of the neuron. Must be loaded from a file. The dict must include the following key to indicate the type of morphology: {‘type’: ‘swc’/’obj’/…} Additional keys must be provides, either ‘filename’ with value indicating the file to be read for the morphology, or a full definition of the morphology according the schema. For swc, required fields are [‘sample’, ‘identifier’, ‘x’, ‘y, ‘z’, ‘r’, ‘parent’]. For mesh, requires an obj file or [‘faces’, ‘vertices’] defined as rastered list of a wavefront obj file
data_source (models.DataSource (optional)) – The datasource. If not specified, default DataSource will be used.