Unify loading of Standard Morphology Files. (#2218)
All morphology loaders now return a `loaded_morphology` object comprising - `morphology`: the morphology corresponding to the data on disk - `segment_tree`: the raw segment tree - `label_dict`: all labels defined in the file - `asc`/`swc`: `axon`, `soma`, `dend`, and `apic` based on tag 1, 2, 3, 4. - `nml`: the union of the label dicts contained in the metadata, prefixed by `grp:`, `nmd:`, and `seg:`. - `metadata`: a set of items given by the fileformat - `swc`: nothing - `asc`: a list of spines and marker sets - `nml`: - `named_segments` a label dict - `segment_groups` a label dict `name` -> segment ids - `group_segments` a map from segment id to group name(s) - `segments` a label dict, one entry per id - `cell_id` id of the cell defining this morphology, if any - `id` id of the morphology Note that loading neuroml still goes via the `neuroml` object and the `cell_morphology`/`morphology` accessors return an optional `loaded_morphology`. ##️ Breaking ️ - Removed the `load_*_raw` functions, as `loaded_morphology` bundles the segment tree. - The interface of `load_*` now has an extra indirection. - The interface of `neuroml` changed. - `label_dict::import` is now called `extend` for future safety (=C++ modules) and Python; calling things `import` (=a keyword) is not well received by `black` et al. ## Issues Closes #1981
Showing
- arbor/include/arbor/morph/label_dict.hpp 1 addition, 1 deletionarbor/include/arbor/morph/label_dict.hpp
- arbor/morph/label_dict.cpp 2 additions, 1 deletionarbor/morph/label_dict.cpp
- arborio/include/arborio/loaded_morphology.hpp 76 additions, 0 deletionsarborio/include/arborio/loaded_morphology.hpp
- arborio/include/arborio/neurolucida.hpp 4 additions, 17 deletionsarborio/include/arborio/neurolucida.hpp
- arborio/include/arborio/neuroml.hpp 3 additions, 25 deletionsarborio/include/arborio/neuroml.hpp
- arborio/include/arborio/swcio.hpp 7 additions, 8 deletionsarborio/include/arborio/swcio.hpp
- arborio/neurolucida.cpp 55 additions, 41 deletionsarborio/neurolucida.cpp
- arborio/neuroml.cpp 4 additions, 4 deletionsarborio/neuroml.cpp
- arborio/nml_parse_morphology.cpp 17 additions, 12 deletionsarborio/nml_parse_morphology.cpp
- arborio/nml_parse_morphology.hpp 2 additions, 1 deletionarborio/nml_parse_morphology.hpp
- arborio/swcio.cpp 27 additions, 4 deletionsarborio/swcio.cpp
- doc/cpp/morphology.rst 64 additions, 17 deletionsdoc/cpp/morphology.rst
- doc/python/cable_cell.rst 2 additions, 8 deletionsdoc/python/cable_cell.rst
- doc/python/morphology.rst 49 additions, 19 deletionsdoc/python/morphology.rst
- doc/scripts/gen-labels.py 2 additions, 1 deletiondoc/scripts/gen-labels.py
- example/single/single.cpp 9 additions, 12 deletionsexample/single/single.cpp
- example/v_clamp/v-clamp.cpp 7 additions, 13 deletionsexample/v_clamp/v-clamp.cpp
- python/cells.cpp 1 addition, 0 deletionspython/cells.cpp
- python/example/gap_junctions.py 3 additions, 3 deletionspython/example/gap_junctions.py
- python/example/probe_lfpykit.py 1 addition, 2 deletionspython/example/probe_lfpykit.py
Please register or sign in to comment