morphio 2.6.2__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.2 → MorphIO-2.7.0}/MorphIO.egg-info/PKG-INFO +1 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/PKG-INFO +1 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_misc.cpp +0 -17
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/enums.h +0 -13
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/properties.h +6 -4
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/types.h +1 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/morphio/__init__.py +0 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/enums.cpp +0 -21
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/morphology.cpp +2 -3
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/writers.cpp +1 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/properties.cpp +12 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/morphologyASC.cpp +1 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/morphologyHDF5.cpp +21 -21
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/morphologyHDF5.h +0 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/morphologySWC.cpp +1 -1
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_1_swc.py +4 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_2_neurolucida.py +2 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_3_h5.py +3 -3
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_6_writers.py +29 -29
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.clang-format +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.github/workflows/clang_format_check.yaml +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.github/workflows/publish-sdist-wheels.yml +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.github/workflows/run-tests.yml +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.gitignore +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.gitmodules +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/.travis.yml +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/3rdparty/CMakeLists.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/CHANGLOG.md +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/CMake/CompilerFlags.cmake +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/CMake/MorphIOConfig.cmake +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/CMakeLists.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/CONTRIBUTING.md +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/COPYING +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/COPYING.LESSER +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/MANIFEST.in +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/MorphIO.egg-info/SOURCES.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/MorphIO.egg-info/dependency_links.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/MorphIO.egg-info/not-zip-safe +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/MorphIO.egg-info/requires.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/MorphIO.egg-info/top_level.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/README.md +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/CMakeLists.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_enums.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_immutable.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_immutable.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_misc.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_mutable.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_mutable.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_vasculature.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bind_vasculature.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bindings_utils.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/bindings_utils.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/binds/python/morphio.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/ci/check_clang_format.sh +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/ci/cpp_test.sh +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/ci/python_test.sh +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/doc/BBPLOGO350.jpg +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/doc/specification.md +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/doc/specification_neurolucida.md +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/examples/getting_started.ipynb +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/examples/getting_started_mutable.ipynb +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/errorMessages.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/exceptions.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/glial_cell.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mito_section.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mitochondria.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/morphology.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/glial_cell.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/mito_section.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/mitochondria.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/modifiers.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/morphology.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/section.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/soma.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/mut/writers.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/section.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/section_base.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/section_base.tpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/section_iterators.hpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/shared_utils.tpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/soma.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/tools.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/vasc/iterators.hpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/vasc/properties.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/vasc/section.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/vasc/vasculature.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/vector_types.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/include/morphio/version.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/morphio/mut/__init__.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/morphio/vasculature/__init__.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/scripts/check-clang-format-all +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/setup.cfg +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/setup.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/CMakeLists.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/errorMessages.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/glial_cell.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mito_section.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mitochondria.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/glial_cell.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/mito_section.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/mitochondria.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/modifiers.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/morphology.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/section.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/mut/soma.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/lex.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/morphologyASC.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/morphologySWC.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/utilsHDF5.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/vasculatureHDF5.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/readers/vasculatureHDF5.h +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/section.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/soma.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/vasc/properties.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/vasc/section.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/vasc/vasculature.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/vector_utils.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/src/version.cpp.in +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/CMakeLists.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/__init__.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/contrib/catch.hpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/astrocyte.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/circle_contour.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/complexe.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/disconnected_neurite.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/merged.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/Neuron.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/endoplasmic-reticulum.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/mitochondria.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/monodim.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/simple-broken-section-type.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/simple-negative-section-type.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/simple.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/soma_no_neurites.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v1/two_child_unmerged.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/v2/Neuron.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/vasculature-broken-section-type.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/vasculature1.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/h5/vasculature2.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/iterators.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/marker-with-string.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/mono-type.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/multiple_point_section.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/multiple_soma.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/nested_single_children.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/neurite_wrong_root_point.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/nrn-order-already-sorted.h5 +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/nrn_ordering.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/pia.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/reversed_NRN_neurite_order.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/sections-block.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/simple-with-font.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/simple-with-image-coord.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/simple.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/simple.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/simple2.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/soma_cylinders.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/soma_multiple_frustums.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/soma_single_frustum.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/soma_three_points_cylinder.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/spine.asc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/data/three_point_soma.swc +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/main.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/requirement_tests.txt +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_0_API.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_10_vasculature.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_4_immut.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_5_mut.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_7_modifiers.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_8_all_morphologies.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_9_surfaces.py +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/test_morphology.cpp +0 -0
- {MorphIO-2.6.2 → MorphIO-2.7.0}/tests/utils.py +0 -0
|
@@ -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) {
|
|
@@ -353,7 +353,7 @@ Property::Properties load(const std::string& uri, unsigned int options) {
|
|
|
353
353
|
|
|
354
354
|
Property::Properties properties = nb_.buildReadOnly();
|
|
355
355
|
properties._cellLevel._cellFamily = NEURON;
|
|
356
|
-
properties._cellLevel._version =
|
|
356
|
+
properties._cellLevel._version = {"asc", 1, 0};
|
|
357
357
|
return properties;
|
|
358
358
|
}
|
|
359
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
|
|
|
@@ -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))
|
|
@@ -705,3 +705,5 @@ def test_marker_with_string():
|
|
|
705
705
|
m = Morphology(DATA_DIR / 'marker-with-string.asc')
|
|
706
706
|
assert_array_equal(m.markers[0].points, np.array([[ -0.97 , -141.169998, 84.769997]],
|
|
707
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)
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import os
|
|
2
|
-
import numpy as np
|
|
3
|
-
from numpy.testing import assert_array_equal, assert_equal, assert_raises
|
|
4
|
-
from nose.tools import ok_
|
|
5
2
|
from pathlib import Path
|
|
6
3
|
|
|
4
|
+
import numpy as np
|
|
5
|
+
from morphio import MitochondriaPointLevel
|
|
6
|
+
from morphio import Morphology as ImmutMorphology
|
|
7
|
+
from morphio import PointLevel, SectionBuilderError, SectionType, WriterError, ostream_redirect
|
|
7
8
|
from morphio.mut import Morphology
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
MitochondriaPointLevel, Morphology as ImmutMorphology, ostream_redirect)
|
|
11
|
-
|
|
12
|
-
from . utils import captured_output, setup_tempdir, assert_string_equal
|
|
9
|
+
from nose.tools import ok_
|
|
10
|
+
from numpy.testing import assert_array_equal, assert_equal, assert_raises
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
from .utils import assert_string_equal, captured_output, setup_tempdir
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
def test_write_empty_file():
|
|
@@ -20,7 +18,7 @@ def test_write_empty_file():
|
|
|
20
18
|
with ostream_redirect(stdout=True, stderr=True):
|
|
21
19
|
with setup_tempdir('test_write_empty_file', no_cleanup=True) as tmp_folder:
|
|
22
20
|
for ext in ['asc', 'swc', 'h5']:
|
|
23
|
-
outname =
|
|
21
|
+
outname = Path(tmp_folder, 'empty.' + ext)
|
|
24
22
|
Morphology().write(outname)
|
|
25
23
|
ok_(not os.path.exists(outname))
|
|
26
24
|
|
|
@@ -31,7 +29,7 @@ def test_write_soma_basic():
|
|
|
31
29
|
morpho.soma.diameters = [2, 3, 3]
|
|
32
30
|
|
|
33
31
|
with setup_tempdir('test_write_soma_basic') as tmp_folder:
|
|
34
|
-
morpho.write(
|
|
32
|
+
morpho.write(Path(tmp_folder, "test_write.swc"))
|
|
35
33
|
morpho.write(Path(tmp_folder, "test_write_pathlib.swc"))
|
|
36
34
|
assert_equal(len(os.listdir(tmp_folder)), 2)
|
|
37
35
|
|
|
@@ -62,17 +60,19 @@ def test_write_basic():
|
|
|
62
60
|
[2, 4]))
|
|
63
61
|
|
|
64
62
|
with setup_tempdir('test_write_basic') as tmp_folder:
|
|
65
|
-
morpho.write(
|
|
66
|
-
morpho.write(
|
|
67
|
-
h5_out =
|
|
63
|
+
morpho.write(Path(tmp_folder, "test_write.asc"))
|
|
64
|
+
morpho.write(Path(tmp_folder, "test_write.swc"))
|
|
65
|
+
h5_out = Path(tmp_folder, "test_write.h5")
|
|
68
66
|
morpho.write(h5_out)
|
|
69
67
|
|
|
70
68
|
expected = [[0., 0., 0.], [0., 5., 0.], [0., 5., 0.], [-5., 5., 0.],
|
|
71
69
|
[0., 5., 0.], [6., 5., 0.], [0., 0., 0.], [0., -4., 0.],
|
|
72
70
|
[0., -4., 0.], [6., -4., 0.], [0., -4., 0.], [-5., -4., 0.]]
|
|
73
|
-
assert_array_equal(ImmutMorphology(
|
|
74
|
-
assert_array_equal(ImmutMorphology(
|
|
75
|
-
|
|
71
|
+
assert_array_equal(ImmutMorphology(Path(tmp_folder, "test_write.asc")).points, expected)
|
|
72
|
+
assert_array_equal(ImmutMorphology(Path(tmp_folder, "test_write.swc")).points, expected)
|
|
73
|
+
h5_morph = ImmutMorphology(Path(tmp_folder, "test_write.h5"))
|
|
74
|
+
assert_array_equal(h5_morph.points, expected)
|
|
75
|
+
assert_equal(h5_morph.version, ('h5', 1, 2))
|
|
76
76
|
|
|
77
77
|
import h5py
|
|
78
78
|
with h5py.File(h5_out, 'r') as h5_file:
|
|
@@ -111,7 +111,7 @@ def test_write_merge_only_child():
|
|
|
111
111
|
for extension in ['swc', 'asc', 'h5']:
|
|
112
112
|
with captured_output() as (_, err):
|
|
113
113
|
with ostream_redirect(stdout=True, stderr=True):
|
|
114
|
-
filename =
|
|
114
|
+
filename = Path(tmp_folder, 'test.{}'.format(extension))
|
|
115
115
|
morpho.write(filename)
|
|
116
116
|
|
|
117
117
|
assert_equal(err.getvalue().strip(),
|
|
@@ -159,7 +159,7 @@ def test_write_perimeter():
|
|
|
159
159
|
[6, 8]))
|
|
160
160
|
|
|
161
161
|
with setup_tempdir('test_write_perimeter') as tmp_folder:
|
|
162
|
-
h5_out =
|
|
162
|
+
h5_out = Path(tmp_folder, "test_write.h5")
|
|
163
163
|
morpho.write(h5_out)
|
|
164
164
|
|
|
165
165
|
assert_array_equal(ImmutMorphology(h5_out).perimeters,
|
|
@@ -167,7 +167,7 @@ def test_write_perimeter():
|
|
|
167
167
|
|
|
168
168
|
# Cannot right a morph with perimeter data to ASC and SWC
|
|
169
169
|
for ext in ['swc', 'asc']:
|
|
170
|
-
out_path =
|
|
170
|
+
out_path = Path(tmp_folder, "test_write_perimeter." + ext)
|
|
171
171
|
assert_raises(WriterError, morpho.write, out_path)
|
|
172
172
|
|
|
173
173
|
|
|
@@ -188,7 +188,7 @@ def test_write_no_soma():
|
|
|
188
188
|
for ext in ['asc', 'h5', 'swc']:
|
|
189
189
|
with captured_output() as (_, err):
|
|
190
190
|
with ostream_redirect(stdout=True, stderr=True):
|
|
191
|
-
outfile =
|
|
191
|
+
outfile = Path(tmp_folder, 'tmp.' + ext)
|
|
192
192
|
morpho.write(outfile)
|
|
193
193
|
assert_equal(err.getvalue().strip(),
|
|
194
194
|
'Warning: writing file without a soma')
|
|
@@ -219,23 +219,23 @@ def test_mitochondria():
|
|
|
219
219
|
[0.6, 0.7, 0.8, 0.9],
|
|
220
220
|
[20, 30, 40, 50]))
|
|
221
221
|
with setup_tempdir('test_mitochondria') as tmp_folder:
|
|
222
|
-
morpho.write(
|
|
222
|
+
morpho.write(Path(tmp_folder, "test.h5"))
|
|
223
223
|
|
|
224
224
|
with captured_output() as (_, err):
|
|
225
225
|
with ostream_redirect(stdout=True, stderr=True):
|
|
226
|
-
morpho.write(
|
|
226
|
+
morpho.write(Path(tmp_folder, "test.swc"))
|
|
227
227
|
assert_string_equal(err.getvalue(),
|
|
228
228
|
"Warning: this cell has mitochondria, they cannot be saved in "
|
|
229
229
|
" ASC or SWC format. Please use H5 if you want to save them.")
|
|
230
230
|
|
|
231
231
|
with captured_output() as (_, err):
|
|
232
232
|
with ostream_redirect(stdout=True, stderr=True):
|
|
233
|
-
morpho.write(
|
|
233
|
+
morpho.write(Path(tmp_folder, "test.asc"))
|
|
234
234
|
assert_string_equal(err.getvalue(),
|
|
235
235
|
"Warning: this cell has mitochondria, they cannot be saved in "
|
|
236
236
|
" ASC or SWC format. Please use H5 if you want to save them.")
|
|
237
237
|
|
|
238
|
-
mito = ImmutMorphology(
|
|
238
|
+
mito = ImmutMorphology(Path(tmp_folder, 'test.h5')).mitochondria
|
|
239
239
|
assert_array_equal(mito.root_sections[0].diameters,
|
|
240
240
|
diameters)
|
|
241
241
|
assert_array_equal(mito.root_sections[0].neurite_section_ids,
|
|
@@ -245,7 +245,7 @@ def test_mitochondria():
|
|
|
245
245
|
|
|
246
246
|
assert_equal(len(mito.root_sections), 1)
|
|
247
247
|
|
|
248
|
-
mito = Morphology(
|
|
248
|
+
mito = Morphology(Path(tmp_folder, 'test.h5')).mitochondria
|
|
249
249
|
assert_equal(len(mito.root_sections), 1)
|
|
250
250
|
assert_equal(mito.root_sections[0].neurite_section_ids, neuronal_section_ids)
|
|
251
251
|
assert_array_equal(mito.section(0).diameters,
|
|
@@ -273,7 +273,7 @@ def test_duplicate_different_diameter():
|
|
|
273
273
|
for ext in ['asc', 'h5', 'swc']:
|
|
274
274
|
with captured_output() as (_, err):
|
|
275
275
|
with ostream_redirect(stdout=True, stderr=True):
|
|
276
|
-
outfile =
|
|
276
|
+
outfile = Path(tmp_folder, 'tmp.' + ext)
|
|
277
277
|
morpho.write(outfile)
|
|
278
278
|
|
|
279
279
|
read = Morphology(outfile)
|
|
@@ -297,7 +297,7 @@ def test_single_point_root_section():
|
|
|
297
297
|
m.append_root_section(PointLevel(points, diameters), SectionType(2))
|
|
298
298
|
|
|
299
299
|
with setup_tempdir('test_single_point_root_section', no_cleanup=True) as tmp_folder:
|
|
300
|
-
assert_raises(SectionBuilderError, m.write,
|
|
300
|
+
assert_raises(SectionBuilderError, m.write, Path(tmp_folder, "h5/empty_vasculature.h5"))
|
|
301
301
|
|
|
302
302
|
m = Morphology()
|
|
303
303
|
points = [[1., 1., 1.]]
|
|
@@ -305,4 +305,4 @@ def test_single_point_root_section():
|
|
|
305
305
|
m.append_root_section(PointLevel(points, diameters), SectionType(2))
|
|
306
306
|
|
|
307
307
|
with setup_tempdir('test_single_point_root_section', no_cleanup=True) as tmp_folder:
|
|
308
|
-
assert_raises(SectionBuilderError, m.write,
|
|
308
|
+
assert_raises(SectionBuilderError, m.write, Path(tmp_folder, "h5/empty_vasculature.h5"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|