morphio 2.6.1__tar.gz → 2.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MorphIO.egg-info/PKG-INFO +3 -1
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MorphIO.egg-info/SOURCES.txt +1 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/PKG-INFO +3 -1
- {MorphIO-2.6.1 → MorphIO-2.7.0}/README.md +2 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_misc.cpp +0 -17
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/enums.h +0 -13
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/properties.h +6 -4
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/types.h +1 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/morphio/__init__.py +0 -1
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/enums.cpp +0 -21
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/morphology.cpp +2 -3
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/writers.cpp +1 -1
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/properties.cpp +12 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/morphologyASC.cpp +19 -9
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/morphologyHDF5.cpp +21 -21
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/morphologyHDF5.h +0 -1
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/morphologySWC.cpp +1 -1
- MorphIO-2.7.0/tests/data/marker-with-string.asc +12 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_1_swc.py +4 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_2_neurolucida.py +7 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_3_h5.py +3 -3
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_6_writers.py +29 -29
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.clang-format +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.github/workflows/clang_format_check.yaml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.github/workflows/publish-sdist-wheels.yml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.github/workflows/run-tests.yml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.gitignore +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.gitmodules +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/.travis.yml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/3rdparty/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/CHANGLOG.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/CMake/CompilerFlags.cmake +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/CMake/MorphIOConfig.cmake +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/CONTRIBUTING.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/COPYING +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/COPYING.LESSER +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MANIFEST.in +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MorphIO.egg-info/dependency_links.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MorphIO.egg-info/not-zip-safe +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MorphIO.egg-info/requires.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/MorphIO.egg-info/top_level.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_enums.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_immutable.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_immutable.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_misc.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_mutable.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_mutable.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_vasculature.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bind_vasculature.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bindings_utils.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/bindings_utils.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/binds/python/morphio.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/ci/check_clang_format.sh +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/ci/cpp_test.sh +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/ci/python_test.sh +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/doc/BBPLOGO350.jpg +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/doc/specification.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/doc/specification_neurolucida.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/examples/getting_started.ipynb +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/examples/getting_started_mutable.ipynb +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/errorMessages.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/exceptions.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/glial_cell.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mito_section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mitochondria.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/morphology.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/glial_cell.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/mito_section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/mitochondria.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/modifiers.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/morphology.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/soma.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/mut/writers.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/section_base.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/section_base.tpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/section_iterators.hpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/shared_utils.tpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/soma.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/tools.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/vasc/iterators.hpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/vasc/properties.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/vasc/section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/vasc/vasculature.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/vector_types.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/include/morphio/version.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/morphio/mut/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/morphio/vasculature/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/scripts/check-clang-format-all +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/setup.cfg +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/setup.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/errorMessages.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/glial_cell.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mito_section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mitochondria.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/glial_cell.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/mito_section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/mitochondria.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/modifiers.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/morphology.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/mut/soma.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/lex.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/morphologyASC.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/morphologySWC.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/utilsHDF5.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/vasculatureHDF5.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/readers/vasculatureHDF5.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/soma.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/vasc/properties.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/vasc/section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/vasc/vasculature.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/vector_utils.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/src/version.cpp.in +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/contrib/catch.hpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/astrocyte.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/circle_contour.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/complexe.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/disconnected_neurite.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/merged.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/Neuron.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/endoplasmic-reticulum.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/mitochondria.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/monodim.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/simple-broken-section-type.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/simple-negative-section-type.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/simple.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/soma_no_neurites.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v1/two_child_unmerged.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/v2/Neuron.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/vasculature-broken-section-type.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/vasculature1.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/h5/vasculature2.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/iterators.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/mono-type.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/multiple_point_section.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/multiple_soma.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/nested_single_children.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/neurite_wrong_root_point.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/nrn-order-already-sorted.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/nrn_ordering.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/pia.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/reversed_NRN_neurite_order.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/sections-block.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/simple-with-font.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/simple-with-image-coord.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/simple.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/simple.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/simple2.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/soma_cylinders.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/soma_multiple_frustums.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/soma_single_frustum.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/soma_three_points_cylinder.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/spine.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/data/three_point_soma.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/main.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/requirement_tests.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_0_API.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_10_vasculature.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_4_immut.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_5_mut.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_7_modifiers.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_8_all_morphologies.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_9_surfaces.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/test_morphology.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.7.0}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MorphIO
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: A neuron morphology IO library
|
|
5
5
|
Home-page: https://github.com/BlueBrain/MorphIO/
|
|
6
6
|
Author: Blue Brain Project, EPFL
|
|
@@ -580,6 +580,8 @@ Description: # MorphIO [ ; End of markers
|
|
581
581
|
```
|
|
582
582
|
|
|
583
|
+
ℹ️ Markers can may have only `(X Y Z)` specified instead of the more common `(X Y Z D)`. In this case, diameters are set to 0.
|
|
584
|
+
|
|
583
585
|
##### Usage
|
|
584
586
|
|
|
585
587
|
```python
|
|
@@ -137,6 +137,7 @@ tests/data/circle_contour.asc
|
|
|
137
137
|
tests/data/complexe.swc
|
|
138
138
|
tests/data/disconnected_neurite.swc
|
|
139
139
|
tests/data/iterators.asc
|
|
140
|
+
tests/data/marker-with-string.asc
|
|
140
141
|
tests/data/mono-type.asc
|
|
141
142
|
tests/data/multiple_point_section.asc
|
|
142
143
|
tests/data/multiple_soma.swc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MorphIO
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: A neuron morphology IO library
|
|
5
5
|
Home-page: https://github.com/BlueBrain/MorphIO/
|
|
6
6
|
Author: Blue Brain Project, EPFL
|
|
@@ -580,6 +580,8 @@ Description: # MorphIO [ ; End of markers
|
|
581
581
|
```
|
|
582
582
|
|
|
583
|
+
ℹ️ Markers can may have only `(X Y Z)` specified instead of the more common `(X Y Z D)`. In this case, diameters are set to 0.
|
|
584
|
+
|
|
583
585
|
##### Usage
|
|
584
586
|
|
|
585
587
|
```python
|
|
@@ -80,23 +80,6 @@ void bind_misc(py::module& m) {
|
|
|
80
80
|
.export_values();
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
py::enum_<morphio::enums::MorphologyVersion>(m, "MorphologyVersion")
|
|
84
|
-
.value("MORPHOLOGY_VERSION_H5_1",
|
|
85
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_H5_1)
|
|
86
|
-
.value("MORPHOLOGY_VERSION_H5_2",
|
|
87
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_H5_2)
|
|
88
|
-
.value("MORPHOLOGY_VERSION_H5_1_1",
|
|
89
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_H5_1_1)
|
|
90
|
-
.value("MORPHOLOGY_VERSION_H5_1_2",
|
|
91
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_H5_1_2)
|
|
92
|
-
.value("MORPHOLOGY_VERSION_SWC_1",
|
|
93
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_SWC_1)
|
|
94
|
-
.value("MORPHOLOGY_VERSION_UNDEFINED",
|
|
95
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_UNDEFINED)
|
|
96
|
-
.value("MORPHOLOGY_VERSION_ASC_1",
|
|
97
|
-
morphio::enums::MorphologyVersion::MORPHOLOGY_VERSION_ASC_1)
|
|
98
|
-
.export_values();
|
|
99
|
-
|
|
100
83
|
py::enum_<morphio::enums::CellFamily>(m, "CellFamily")
|
|
101
84
|
.value("NEURON", morphio::enums::CellFamily::NEURON)
|
|
102
85
|
.value("GLIA", morphio::enums::CellFamily::GLIA)
|
|
@@ -35,19 +35,6 @@ enum Warning {
|
|
|
35
35
|
WRITE_EMPTY_MORPHOLOGY
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
/** The supported versions for morphology files. */
|
|
39
|
-
enum MorphologyVersion {
|
|
40
|
-
MORPHOLOGY_VERSION_H5_1 = 1,
|
|
41
|
-
MORPHOLOGY_VERSION_H5_2 = 2,
|
|
42
|
-
MORPHOLOGY_VERSION_H5_1_1 = 3,
|
|
43
|
-
MORPHOLOGY_VERSION_ASC_1 = 4,
|
|
44
|
-
MORPHOLOGY_VERSION_SWC_1 = 101,
|
|
45
|
-
MORPHOLOGY_VERSION_H5_1_2 = 5,
|
|
46
|
-
MORPHOLOGY_VERSION_UNDEFINED
|
|
47
|
-
};
|
|
48
|
-
std::ostream& operator<<(std::ostream& os, MorphologyVersion v);
|
|
49
|
-
|
|
50
|
-
|
|
51
38
|
enum AnnotationType {
|
|
52
39
|
SINGLE_CHILD,
|
|
53
40
|
};
|
|
@@ -152,7 +152,9 @@ struct Marker {
|
|
|
152
152
|
|
|
153
153
|
struct CellLevel {
|
|
154
154
|
CellLevel()
|
|
155
|
-
: _version(
|
|
155
|
+
: _version({"undefined", 0, 0}) {}
|
|
156
|
+
|
|
157
|
+
// A tuple (file format (std::string), major version, minor version)
|
|
156
158
|
MorphologyVersion _version;
|
|
157
159
|
morphio::CellFamily _cellFamily;
|
|
158
160
|
SomaType _somaType;
|
|
@@ -162,6 +164,9 @@ struct CellLevel {
|
|
|
162
164
|
bool diff(const CellLevel& other, LogLevel logLevel) const;
|
|
163
165
|
bool operator==(const CellLevel& other) const;
|
|
164
166
|
bool operator!=(const CellLevel& other) const;
|
|
167
|
+
std::string fileFormat() const;
|
|
168
|
+
uint32_t majorVersion();
|
|
169
|
+
uint32_t minorVersion();
|
|
165
170
|
};
|
|
166
171
|
|
|
167
172
|
// The lowest level data blob
|
|
@@ -188,9 +193,6 @@ struct Properties {
|
|
|
188
193
|
template <typename T>
|
|
189
194
|
const std::vector<typename T::Type>& get() const noexcept;
|
|
190
195
|
|
|
191
|
-
morphio::MorphologyVersion& version() noexcept {
|
|
192
|
-
return _cellLevel._version;
|
|
193
|
-
}
|
|
194
196
|
const morphio::MorphologyVersion& version() const noexcept {
|
|
195
197
|
return _cellLevel._version;
|
|
196
198
|
}
|
|
@@ -4,27 +4,6 @@
|
|
|
4
4
|
namespace morphio {
|
|
5
5
|
namespace enums {
|
|
6
6
|
|
|
7
|
-
/** Output stream formatter for MorphologyVersion */
|
|
8
|
-
std::ostream& operator<<(std::ostream& os, const MorphologyVersion v) {
|
|
9
|
-
switch (v) {
|
|
10
|
-
case MORPHOLOGY_VERSION_H5_1:
|
|
11
|
-
return os << "h5v1";
|
|
12
|
-
case MORPHOLOGY_VERSION_H5_1_1:
|
|
13
|
-
return os << "h5v1.1";
|
|
14
|
-
case MORPHOLOGY_VERSION_H5_1_2:
|
|
15
|
-
return os << "h5v1.2";
|
|
16
|
-
case MORPHOLOGY_VERSION_H5_2:
|
|
17
|
-
return os << "h5v2";
|
|
18
|
-
case MORPHOLOGY_VERSION_SWC_1:
|
|
19
|
-
return os << "swcv1";
|
|
20
|
-
case MORPHOLOGY_VERSION_ASC_1:
|
|
21
|
-
return os << "ascv1";
|
|
22
|
-
default:
|
|
23
|
-
case MORPHOLOGY_VERSION_UNDEFINED:
|
|
24
|
-
return os << "UNDEFINED";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
7
|
/** Output stream formatter for MorphologyVersion */
|
|
29
8
|
std::ostream& operator<<(std::ostream& os, const SomaType v) {
|
|
30
9
|
switch (v) {
|
|
@@ -27,13 +27,12 @@ Morphology::Morphology(const Property::Properties& properties, unsigned int opti
|
|
|
27
27
|
: _properties(std::make_shared<Property::Properties>(properties)) {
|
|
28
28
|
buildChildren(_properties);
|
|
29
29
|
|
|
30
|
-
if (
|
|
30
|
+
if (_properties->_cellLevel.fileFormat() != "swc")
|
|
31
31
|
_properties->_cellLevel._somaType = getSomaType(soma().points().size());
|
|
32
32
|
|
|
33
33
|
// For SWC and ASC, sanitization and modifier application are already taken care of by
|
|
34
34
|
// their respective loaders
|
|
35
|
-
if ((
|
|
36
|
-
version() == MORPHOLOGY_VERSION_H5_2)) {
|
|
35
|
+
if (properties._cellLevel.fileFormat() == "h5") {
|
|
37
36
|
mut::Morphology mutable_morph(*this);
|
|
38
37
|
mutable_morph.sanitize();
|
|
39
38
|
if (options) {
|
|
@@ -374,7 +374,7 @@ void h5(const Morphology& morpho, const std::string& filename) {
|
|
|
374
374
|
|
|
375
375
|
HighFive::Group g_metadata = h5_file.createGroup("metadata");
|
|
376
376
|
|
|
377
|
-
write_attribute(g_metadata, "version", std::vector<uint32_t>{1,
|
|
377
|
+
write_attribute(g_metadata, "version", std::vector<uint32_t>{1, 2});
|
|
378
378
|
write_attribute(g_metadata, "cell_family", std::vector<uint32_t>{morpho.cellFamily()});
|
|
379
379
|
write_attribute(h5_file, "comment", std::vector<std::string>{version_string()});
|
|
380
380
|
|
|
@@ -217,6 +217,18 @@ bool CellLevel::operator!=(const CellLevel& other) const {
|
|
|
217
217
|
return diff(other, LogLevel::ERROR);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
std::string CellLevel::fileFormat() const {
|
|
221
|
+
return std::get<0>(_version);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
uint32_t CellLevel::majorVersion() {
|
|
225
|
+
return std::get<1>(_version);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
uint32_t CellLevel::minorVersion() {
|
|
229
|
+
return std::get<2>(_version);
|
|
230
|
+
}
|
|
231
|
+
|
|
220
232
|
|
|
221
233
|
MitochondriaPointLevel::MitochondriaPointLevel(const MitochondriaPointLevel& data,
|
|
222
234
|
const SectionRange& range) {
|
|
@@ -76,23 +76,30 @@ class NeurolucidaParser
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
private:
|
|
79
|
-
std::tuple<Point, floatType> parse_point(NeurolucidaLexer& lex) {
|
|
79
|
+
std::tuple<Point, floatType> parse_point(NeurolucidaLexer& lex, bool is_marker) {
|
|
80
80
|
lex.expect(Token::LPAREN, "Point should start in LPAREN");
|
|
81
|
-
std::array<morphio::floatType, 4> point{}; // X,Y,Z,
|
|
82
|
-
for (
|
|
81
|
+
std::array<morphio::floatType, 4> point{}; // X,Y,Z,D
|
|
82
|
+
for (unsigned int i = 0; i < 4; i++) {
|
|
83
83
|
try {
|
|
84
84
|
#ifdef MORPHIO_USE_DOUBLE
|
|
85
|
-
|
|
85
|
+
point[i] = std::stod(lex.consume()->str());
|
|
86
86
|
#else
|
|
87
|
-
|
|
87
|
+
point[i] = std::stof(lex.consume()->str());
|
|
88
88
|
#endif
|
|
89
89
|
} catch (const std::invalid_argument&) {
|
|
90
90
|
throw RawDataError(err_.ERROR_PARSING_POINT(lex.line_num(), lex.current()->str()));
|
|
91
91
|
}
|
|
92
|
+
|
|
93
|
+
// Markers can have an s-exp (X Y Z) without diameter
|
|
94
|
+
if (is_marker && i == 2 && (lex_.peek()->str() == ")")) {
|
|
95
|
+
point[3] = 0;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
lex.consume();
|
|
95
101
|
|
|
102
|
+
// case where the s-exp is (X Y Z R WORD). For example: (1 1 0 1 S1)
|
|
96
103
|
if (lex.current()->id == +Token::WORD) {
|
|
97
104
|
lex.consume(Token::WORD);
|
|
98
105
|
}
|
|
@@ -231,13 +238,14 @@ class NeurolucidaParser
|
|
|
231
238
|
} else if (id == Token::RPAREN) {
|
|
232
239
|
return header;
|
|
233
240
|
} else if (id == Token::LPAREN) {
|
|
241
|
+
const auto next_token = static_cast<Token>(peek_id);
|
|
234
242
|
if (skip_sexp(peek_id)) {
|
|
235
243
|
// skip words/strings/markers
|
|
236
244
|
lex_.consume_until_balanced_paren();
|
|
237
245
|
if (peek_id == +Token::FONT)
|
|
238
246
|
lex_.consume_until_balanced_paren();
|
|
239
|
-
} else if (is_neurite_type(
|
|
240
|
-
header.token =
|
|
247
|
+
} else if (is_neurite_type(next_token)) {
|
|
248
|
+
header.token = next_token;
|
|
241
249
|
lex_.consume(); // Advance to NeuriteType
|
|
242
250
|
lex_.consume();
|
|
243
251
|
lex_.consume(Token::RPAREN, "New Neurite should end in RPAREN");
|
|
@@ -286,7 +294,7 @@ class NeurolucidaParser
|
|
|
286
294
|
} else if (peek_id == +Token::NUMBER) {
|
|
287
295
|
Point point;
|
|
288
296
|
floatType radius;
|
|
289
|
-
std::tie(point, radius) = parse_point(lex_);
|
|
297
|
+
std::tie(point, radius) = parse_point(lex_, (header.token == Token::STRING));
|
|
290
298
|
points.push_back(point);
|
|
291
299
|
diameters.push_back(radius);
|
|
292
300
|
} else if (peek_id == +Token::LPAREN) {
|
|
@@ -300,6 +308,8 @@ class NeurolucidaParser
|
|
|
300
308
|
throw RawDataError(
|
|
301
309
|
err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.peek()->str()));
|
|
302
310
|
}
|
|
311
|
+
} else if (id == Token::STRING) {
|
|
312
|
+
lex_.consume();
|
|
303
313
|
} else {
|
|
304
314
|
throw RawDataError(err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.peek()->str()));
|
|
305
315
|
}
|
|
@@ -343,7 +353,7 @@ Property::Properties load(const std::string& uri, unsigned int options) {
|
|
|
343
353
|
|
|
344
354
|
Property::Properties properties = nb_.buildReadOnly();
|
|
345
355
|
properties._cellLevel._cellFamily = NEURON;
|
|
346
|
-
properties._cellLevel._version =
|
|
356
|
+
properties._cellLevel._version = {"asc", 1, 0};
|
|
347
357
|
return properties;
|
|
348
358
|
}
|
|
349
359
|
|
|
@@ -75,6 +75,7 @@ Property::Properties MorphologyHDF5::load() {
|
|
|
75
75
|
_readPerimeters(firstSectionOffset);
|
|
76
76
|
_readMitochondria();
|
|
77
77
|
_readEndoplasmicReticulum();
|
|
78
|
+
std::get<0>(_properties._cellLevel._version) = "h5";
|
|
78
79
|
|
|
79
80
|
return _properties;
|
|
80
81
|
}
|
|
@@ -114,21 +115,21 @@ void MorphologyHDF5::_readMetadata(const std::string& source) {
|
|
|
114
115
|
const auto metadata = _group.getGroup(_g_metadata);
|
|
115
116
|
const auto attr = metadata.getAttribute(_a_version);
|
|
116
117
|
|
|
117
|
-
uint32_t
|
|
118
|
-
attr.read(
|
|
119
|
-
|
|
118
|
+
uint32_t versions[2];
|
|
119
|
+
attr.read(&versions);
|
|
120
|
+
std::get<1>(_properties._cellLevel._version) = versions[0];
|
|
121
|
+
std::get<2>(_properties._cellLevel._version) = versions[1];
|
|
122
|
+
const auto majorVersion = _properties._cellLevel.majorVersion();
|
|
123
|
+
const auto minorVersion = _properties._cellLevel.minorVersion();
|
|
124
|
+
if (majorVersion == 1 && (minorVersion == 1 || minorVersion == 2)) {
|
|
120
125
|
uint32_t family;
|
|
121
126
|
const auto familyAttr = metadata.getAttribute(_a_family);
|
|
122
127
|
familyAttr.read(family);
|
|
123
|
-
if (version[1] == 1)
|
|
124
|
-
_properties._cellLevel._version = MORPHOLOGY_VERSION_H5_1_1;
|
|
125
|
-
else
|
|
126
|
-
_properties._cellLevel._version = MORPHOLOGY_VERSION_H5_1_2;
|
|
127
128
|
_properties._cellLevel._cellFamily = static_cast<CellFamily>(family);
|
|
128
129
|
} else {
|
|
129
130
|
throw morphio::RawDataError(
|
|
130
|
-
"Error in " + source + "\nUnsupported h5 version: " + std::to_string(
|
|
131
|
-
"." + std::to_string(
|
|
131
|
+
"Error in " + source + "\nUnsupported h5 version: " + std::to_string(majorVersion) +
|
|
132
|
+
"." + std::to_string(minorVersion) +
|
|
132
133
|
"See "
|
|
133
134
|
"https://bbpteam.epfl.ch/documentation/projects/Morphology%20Documentation/latest/"
|
|
134
135
|
"index.html for the list of supported versions.");
|
|
@@ -139,9 +140,11 @@ void MorphologyHDF5::_readMetadata(const std::string& source) {
|
|
|
139
140
|
try {
|
|
140
141
|
_resolveV1();
|
|
141
142
|
|
|
142
|
-
// The fact that the resolution passes and
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
// The fact that the resolution passes and majorVersion is still uninitialized tells us
|
|
144
|
+
// it is h5v1.0
|
|
145
|
+
if (_properties._cellLevel.majorVersion() == 0) {
|
|
146
|
+
std::get<1>(_properties._cellLevel._version) = 1; // major version
|
|
147
|
+
std::get<2>(_properties._cellLevel._version) = 0; // minor version
|
|
145
148
|
// Version 1.0 only support NEURON has a CellFamily.
|
|
146
149
|
// Other CellFamily have been added in version 1.1:
|
|
147
150
|
// https://bbpteam.epfl.ch/documentation/projects/Morphology%20Documentation/latest/h5v1.html
|
|
@@ -274,7 +277,9 @@ int MorphologyHDF5::_readSections() {
|
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
void MorphologyHDF5::_readPerimeters(int firstSectionOffset) {
|
|
277
|
-
|
|
280
|
+
// Perimeter information is available starting at v1.1
|
|
281
|
+
if (!(_properties._cellLevel.majorVersion() == 1 && _properties._cellLevel.minorVersion() > 0 &&
|
|
282
|
+
HasNeurites(firstSectionOffset)))
|
|
278
283
|
return;
|
|
279
284
|
|
|
280
285
|
try {
|
|
@@ -301,10 +306,9 @@ void MorphologyHDF5::_readPerimeters(int firstSectionOffset) {
|
|
|
301
306
|
template <typename T>
|
|
302
307
|
void MorphologyHDF5::_read(const std::string& groupName,
|
|
303
308
|
const std::string& _dataset,
|
|
304
|
-
MorphologyVersion version,
|
|
305
309
|
unsigned int expectedDimension,
|
|
306
310
|
T& data) {
|
|
307
|
-
if (_properties.
|
|
311
|
+
if (_properties._cellLevel.majorVersion() != 1 || _properties._cellLevel.minorVersion() < 1)
|
|
308
312
|
return;
|
|
309
313
|
try {
|
|
310
314
|
const auto group = _group.getGroup(groupName);
|
|
@@ -339,22 +343,18 @@ void MorphologyHDF5::_readEndoplasmicReticulum() {
|
|
|
339
343
|
|
|
340
344
|
_read(_g_endoplasmic_reticulum,
|
|
341
345
|
_d_section_index,
|
|
342
|
-
MORPHOLOGY_VERSION_H5_1_1,
|
|
343
346
|
1,
|
|
344
347
|
_properties._endoplasmicReticulumLevel._sectionIndices);
|
|
345
348
|
_read(_g_endoplasmic_reticulum,
|
|
346
349
|
_d_volume,
|
|
347
|
-
MORPHOLOGY_VERSION_H5_1_1,
|
|
348
350
|
1,
|
|
349
351
|
_properties._endoplasmicReticulumLevel._volumes);
|
|
350
352
|
_read(_g_endoplasmic_reticulum,
|
|
351
353
|
_d_surface_area,
|
|
352
|
-
MORPHOLOGY_VERSION_H5_1_1,
|
|
353
354
|
1,
|
|
354
355
|
_properties._endoplasmicReticulumLevel._surfaceAreas);
|
|
355
356
|
_read(_g_endoplasmic_reticulum,
|
|
356
357
|
_d_filament_count,
|
|
357
|
-
MORPHOLOGY_VERSION_H5_1_1,
|
|
358
358
|
1,
|
|
359
359
|
_properties._endoplasmicReticulumLevel._filamentCounts);
|
|
360
360
|
}
|
|
@@ -371,7 +371,7 @@ void MorphologyHDF5::_readMitochondria() {
|
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
std::vector<std::vector<morphio::floatType>> points;
|
|
374
|
-
_read(_g_mitochondria, _d_points,
|
|
374
|
+
_read(_g_mitochondria, _d_points, 2, points);
|
|
375
375
|
|
|
376
376
|
auto& mitoSectionId = _properties.get<Property::MitoNeuriteSectionId>();
|
|
377
377
|
auto& pathlength = _properties.get<Property::MitoPathLength>();
|
|
@@ -386,7 +386,7 @@ void MorphologyHDF5::_readMitochondria() {
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
std::vector<std::vector<int32_t>> structure;
|
|
389
|
-
_read(_g_mitochondria, "structure",
|
|
389
|
+
_read(_g_mitochondria, "structure", 2, structure);
|
|
390
390
|
|
|
391
391
|
auto& mitoSection = _properties.get<Property::MitoSection>();
|
|
392
392
|
mitoSection.reserve(mitoSection.size() + structure.size());
|
|
@@ -353,7 +353,7 @@ class SWCBuilder
|
|
|
353
353
|
Property::Properties load(const std::string& uri, unsigned int options) {
|
|
354
354
|
auto properties = SWCBuilder(uri)._buildProperties(options);
|
|
355
355
|
properties._cellLevel._cellFamily = NEURON;
|
|
356
|
-
properties._cellLevel._version =
|
|
356
|
+
properties._cellLevel._version = {"swc", 1, 0};
|
|
357
357
|
return properties;
|
|
358
358
|
}
|
|
359
359
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
; The following annotation has been found in C280999A-I4.asc
|
|
2
|
+
; It is a top-level annotation with a quote inside
|
|
3
|
+
( (Color Red)
|
|
4
|
+
( -0.97 -141.17 84.77)
|
|
5
|
+
"<--4 boutons on a PC soma"
|
|
6
|
+
) ; End of text
|
|
7
|
+
|
|
8
|
+
("CellBody"
|
|
9
|
+
(Color Red)
|
|
10
|
+
(CellBody)
|
|
11
|
+
(0 0 0 2)
|
|
12
|
+
)
|
|
@@ -447,3 +447,7 @@ def test_root_node_split():
|
|
|
447
447
|
def test_three_point_soma():
|
|
448
448
|
n = Morphology(os.path.join(_path, 'three_point_soma.swc'))
|
|
449
449
|
assert_equal(n.soma_type, SomaType.SOMA_NEUROMORPHO_THREE_POINT_CYLINDERS)
|
|
450
|
+
|
|
451
|
+
def test_version():
|
|
452
|
+
assert_array_equal(Morphology(os.path.join(_path, 'simple.swc')).version,
|
|
453
|
+
('swc', 1, 0))
|
|
@@ -700,3 +700,10 @@ def test_skip_imagecoord():
|
|
|
700
700
|
def test_Sections_block():
|
|
701
701
|
assert_array_equal(Morphology(DATA_DIR / 'sections-block.asc').points,
|
|
702
702
|
Morphology(DATA_DIR / 'simple.asc').points)
|
|
703
|
+
|
|
704
|
+
def test_marker_with_string():
|
|
705
|
+
m = Morphology(DATA_DIR / 'marker-with-string.asc')
|
|
706
|
+
assert_array_equal(m.markers[0].points, np.array([[ -0.97 , -141.169998, 84.769997]],
|
|
707
|
+
dtype=np.float32))
|
|
708
|
+
def test_version():
|
|
709
|
+
assert_array_equal(Morphology(DATA_DIR / 'simple.asc').version, ('asc', 1, 0))
|
|
@@ -3,7 +3,7 @@ from itertools import chain, repeat
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
5
|
import requests
|
|
6
|
-
from morphio import (CellFamily, Morphology,
|
|
6
|
+
from morphio import (CellFamily, Morphology, RawDataError, SectionType,
|
|
7
7
|
ostream_redirect)
|
|
8
8
|
from nose.tools import assert_equal, assert_raises, ok_
|
|
9
9
|
from numpy.testing import assert_array_equal
|
|
@@ -21,10 +21,10 @@ def test_v1():
|
|
|
21
21
|
assert_equal(len(n.root_sections), 2)
|
|
22
22
|
assert_equal(n.root_sections[0].type, 3)
|
|
23
23
|
assert_equal(n.root_sections[1].type, 2)
|
|
24
|
-
assert_equal(n.version,
|
|
24
|
+
assert_equal(n.version, ("h5", 1, 1))
|
|
25
25
|
|
|
26
26
|
n = Morphology(H5V1_PATH / 'Neuron.h5')
|
|
27
|
-
assert_equal(n.version,
|
|
27
|
+
assert_equal(n.version, ("h5", 1, 0))
|
|
28
28
|
|
|
29
29
|
assert_equal(len(n.sections), 84)
|
|
30
30
|
assert_equal(len(n.soma.points), 3)
|