Skip to content
Snippets Groups Projects
Unverified Commit 08a157fb authored by Thorsten Hater's avatar Thorsten Hater Committed by GitHub
Browse files

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`.

## :warning:️ Breaking :warning:️ 

- 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
parent ed677632
No related branches found
No related tags found
No related merge requests found
Showing
with 336 additions and 189 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment