morphio 2.5.1__tar.gz → 2.5.2__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.5.1 → MorphIO-2.5.2}/CMakeLists.txt +1 -1
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MorphIO.egg-info/PKG-INFO +20 -1
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MorphIO.egg-info/SOURCES.txt +4 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/PKG-INFO +20 -1
- {MorphIO-2.5.1 → MorphIO-2.5.2}/README.md +19 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_immutable.cpp +3 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_misc.cpp +15 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_mutable.cpp +3 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/morphology.h +5 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/morphology.h +19 -6
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/properties.h +7 -3
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/morphology.cpp +5 -1
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/morphology.cpp +2 -6
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/lex.cpp +21 -2
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/morphologyASC.cpp +98 -34
- MorphIO-2.5.2/tests/data/pia.asc +38 -0
- MorphIO-2.5.2/tests/data/sections-block.asc +38 -0
- MorphIO-2.5.2/tests/data/simple-with-font.asc +36 -0
- MorphIO-2.5.2/tests/data/simple-with-image-coord.asc +34 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_2_neurolucida.py +108 -5
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_5_mut.py +6 -4
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_6_writers.py +1 -1
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.clang-format +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.github/workflows/clang_format_check.yaml +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.github/workflows/publish-sdist-wheels.yml +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.github/workflows/run-tests.yml +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.gitignore +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.gitmodules +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/.travis.yml +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/3rdparty/CMakeLists.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/CHANGLOG.md +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/CMake/CompilerFlags.cmake +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/CMake/MorphIOConfig.cmake +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/CONTRIBUTING.md +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/COPYING +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/COPYING.LESSER +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MANIFEST.in +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MorphIO.egg-info/dependency_links.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MorphIO.egg-info/not-zip-safe +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MorphIO.egg-info/requires.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/MorphIO.egg-info/top_level.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/CMakeLists.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_enums.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_immutable.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_misc.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_mutable.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_vasculature.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bind_vasculature.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bindings_utils.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/bindings_utils.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/binds/python/morphio.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/ci/check_clang_format.sh +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/ci/cpp_test.sh +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/ci/python_test.sh +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/doc/BBPLOGO350.jpg +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/doc/specification.md +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/doc/specification_neurolucida.md +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/examples/getting_started.ipynb +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/examples/getting_started_mutable.ipynb +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/enums.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/errorMessages.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/exceptions.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/glial_cell.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mito_section.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mitochondria.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/glial_cell.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/mito_section.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/mitochondria.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/modifiers.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/section.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/soma.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/mut/writers.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/section.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/section_base.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/section_base.tpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/section_iterators.hpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/shared_utils.tpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/soma.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/tools.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/types.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/vasc/iterators.hpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/vasc/properties.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/vasc/section.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/vasc/vasculature.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/vector_types.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/include/morphio/version.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/morphio/__init__.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/morphio/mut/__init__.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/morphio/vasculature/__init__.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/scripts/check-clang-format-all +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/setup.cfg +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/setup.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/CMakeLists.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/enums.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/errorMessages.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/glial_cell.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mito_section.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mitochondria.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/glial_cell.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/mito_section.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/mitochondria.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/modifiers.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/section.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/soma.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/mut/writers.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/properties.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/morphologyASC.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/morphologyHDF5.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/morphologyHDF5.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/morphologySWC.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/morphologySWC.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/utilsHDF5.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/vasculatureHDF5.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/readers/vasculatureHDF5.h +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/section.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/soma.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/vasc/properties.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/vasc/section.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/vasc/vasculature.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/vector_utils.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/src/version.cpp.in +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/CMakeLists.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/__init__.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/contrib/catch.hpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/astrocyte.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/circle_contour.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/complexe.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/disconnected_neurite.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/merged.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/Neuron.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/endoplasmic-reticulum.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/mitochondria.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/monodim.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/simple-broken-section-type.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/simple-negative-section-type.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/simple.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/soma_no_neurites.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v1/two_child_unmerged.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v2/Neuron.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/v2/no-metadata.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/vasculature-broken-section-type.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/vasculature1.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/h5/vasculature2.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/iterators.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/mono-type.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/multiple_point_section.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/multiple_soma.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/nested_single_children.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/neurite_wrong_root_point.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/nrn-order-already-sorted.h5 +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/nrn_ordering.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/reversed_NRN_neurite_order.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/simple.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/simple.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/simple2.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/soma_cylinders.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/soma_multiple_frustums.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/soma_single_frustum.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/soma_three_points_cylinder.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/spine.asc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/data/three_point_soma.swc +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/main.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/requirement_tests.txt +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_0_API.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_10_vasculature.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_1_swc.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_3_h5.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_4_immut.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_7_modifiers.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_8_all_morphologies.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_9_surfaces.py +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/test_morphology.cpp +0 -0
- {MorphIO-2.5.1 → MorphIO-2.5.2}/tests/utils.py +0 -0
|
@@ -6,7 +6,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
6
6
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
7
7
|
|
|
8
8
|
option(BUILD_BINDINGS "Build the python bindings" ON)
|
|
9
|
-
option(
|
|
9
|
+
option(MorphIO_CXX_WARNINGS "Compile C++ with warnings" ON)
|
|
10
10
|
option(EXTERNAL_HIGHFIVE "Use HighFive from external source" OFF)
|
|
11
11
|
option(MORPHIO_USE_DOUBLE "Use doubles instead of floats" OFF)
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MorphIO
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: A neuron morphology IO library
|
|
5
5
|
Home-page: https://github.com/BlueBrain/MorphIO/
|
|
6
6
|
Author: Blue Brain Project, EPFL
|
|
@@ -495,6 +495,25 @@ Description: # MorphIO [ for more information.
|
|
@@ -144,7 +144,11 @@ tests/data/nested_single_children.asc
|
|
|
144
144
|
tests/data/neurite_wrong_root_point.swc
|
|
145
145
|
tests/data/nrn-order-already-sorted.h5
|
|
146
146
|
tests/data/nrn_ordering.swc
|
|
147
|
+
tests/data/pia.asc
|
|
147
148
|
tests/data/reversed_NRN_neurite_order.swc
|
|
149
|
+
tests/data/sections-block.asc
|
|
150
|
+
tests/data/simple-with-font.asc
|
|
151
|
+
tests/data/simple-with-image-coord.asc
|
|
148
152
|
tests/data/simple.asc
|
|
149
153
|
tests/data/simple.swc
|
|
150
154
|
tests/data/simple2.asc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MorphIO
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: A neuron morphology IO library
|
|
5
5
|
Home-page: https://github.com/BlueBrain/MorphIO/
|
|
6
6
|
Author: Blue Brain Project, EPFL
|
|
@@ -495,6 +495,25 @@ Description: # MorphIO [ for more information.
|
|
@@ -488,6 +488,25 @@ morphio.set_maximum_warnings(0)
|
|
|
488
488
|
# Specification
|
|
489
489
|
See https://github.com/BlueBrain/MorphIO/blob/master/doc/specification.md
|
|
490
490
|
|
|
491
|
+
|
|
492
|
+
# H5v2
|
|
493
|
+
|
|
494
|
+
Starting at version 2.5.2, the file format `h5v2` is no longer supported.
|
|
495
|
+
If you have morphologies in this format, you can convert them with:
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
pip install morphio==2.5.1 morph-tool==2.3.0
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
and then:
|
|
502
|
+
```python
|
|
503
|
+
# single file, OUTPUT must end with `.h5`
|
|
504
|
+
morph-tool convert file INPUTFILE OUTPUT
|
|
505
|
+
|
|
506
|
+
# bulk conversion
|
|
507
|
+
morph-tool convert folder -ext h5 INPUTDIR OUTPUTDIR
|
|
508
|
+
```
|
|
509
|
+
|
|
491
510
|
# Contributing
|
|
492
511
|
If you want to improve the project or you see any issue, every contribution is welcome.
|
|
493
512
|
Please check the [contribution guidelines](CONTRIBUTING.md) for more information.
|
|
@@ -46,6 +46,9 @@ void bind_immutable_module(py::module& m) {
|
|
|
46
46
|
.def_property_readonly("annotations",
|
|
47
47
|
&morphio::Morphology::annotations,
|
|
48
48
|
"Returns a list of annotations")
|
|
49
|
+
.def_property_readonly("markers",
|
|
50
|
+
&morphio::Morphology::markers,
|
|
51
|
+
"Returns the list of NeuroLucida markers")
|
|
49
52
|
.def_property_readonly("endoplasmic_reticulum",
|
|
50
53
|
&morphio::Morphology::endoplasmicReticulum,
|
|
51
54
|
"Returns the endoplasmic reticulum object")
|
|
@@ -252,6 +252,21 @@ void bind_misc(py::module& m) {
|
|
|
252
252
|
[](morphio::Property::Annotation* a) { return a->_points._perimeters; },
|
|
253
253
|
"Returns the list of perimeters of annotated points");
|
|
254
254
|
|
|
255
|
+
py::class_<morphio::Property::Marker>(m,
|
|
256
|
+
"Marker",
|
|
257
|
+
"Container class for NeuroLucida extra Markers ")
|
|
258
|
+
.def_property_readonly(
|
|
259
|
+
"label",
|
|
260
|
+
[](morphio::Property::Marker* marker) { return marker->_label; },
|
|
261
|
+
"Returns the label")
|
|
262
|
+
.def_property_readonly(
|
|
263
|
+
"points",
|
|
264
|
+
[](morphio::Property::Marker* marker) { return marker->_pointLevel._points; },
|
|
265
|
+
"Returns the list of coordinates of the marker points")
|
|
266
|
+
.def_property_readonly(
|
|
267
|
+
"diameters",
|
|
268
|
+
[](morphio::Property::Marker* marker) { return marker->_pointLevel._diameters; },
|
|
269
|
+
"Returns the list of diameters of the marker points");
|
|
255
270
|
|
|
256
271
|
py::class_<morphio::Property::MitochondriaPointLevel>(
|
|
257
272
|
m,
|
|
@@ -71,6 +71,9 @@ void bind_mutable_module(py::module& m) {
|
|
|
71
71
|
.def_property_readonly("annotations",
|
|
72
72
|
&morphio::mut::Morphology::annotations,
|
|
73
73
|
"Returns a list of annotations")
|
|
74
|
+
.def_property_readonly("markers",
|
|
75
|
+
&morphio::mut::Morphology::markers,
|
|
76
|
+
"Returns the list of NeuroLucida markers")
|
|
74
77
|
.def("section",
|
|
75
78
|
&morphio::mut::Morphology::section,
|
|
76
79
|
"Returns the section with the given id\n\n"
|
|
@@ -61,6 +61,11 @@ class Morphology
|
|
|
61
61
|
**/
|
|
62
62
|
const std::vector<Property::Annotation>& annotations() const;
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Return the markers
|
|
66
|
+
**/
|
|
67
|
+
const std::vector<Property::Marker>& markers() const;
|
|
68
|
+
|
|
64
69
|
/**
|
|
65
70
|
* Return a vector of all root sections
|
|
66
71
|
* (sections whose parent ID are -1)
|
|
@@ -102,6 +102,11 @@ class Morphology
|
|
|
102
102
|
**/
|
|
103
103
|
inline const std::vector<Property::Annotation>& annotations() const noexcept;
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Return the markers from the ASC file
|
|
107
|
+
**/
|
|
108
|
+
inline const std::vector<Property::Marker>& markers() const noexcept;
|
|
109
|
+
|
|
105
110
|
/**
|
|
106
111
|
Get the shared pointer for the given section
|
|
107
112
|
|
|
@@ -186,6 +191,7 @@ class Morphology
|
|
|
186
191
|
void write(const std::string& filename);
|
|
187
192
|
|
|
188
193
|
inline void addAnnotation(const morphio::Property::Annotation& annotation);
|
|
194
|
+
inline void addMarker(const morphio::Property::Marker& marker);
|
|
189
195
|
|
|
190
196
|
/**
|
|
191
197
|
Return the data structure used to create read-only morphologies
|
|
@@ -222,7 +228,6 @@ class Morphology
|
|
|
222
228
|
std::shared_ptr<morphio::Property::CellLevel> _cellProperties;
|
|
223
229
|
std::vector<std::shared_ptr<Section>> _rootSections;
|
|
224
230
|
std::map<uint32_t, std::shared_ptr<Section>> _sections;
|
|
225
|
-
std::vector<morphio::Property::Annotation> _annotations;
|
|
226
231
|
Mitochondria _mitochondria;
|
|
227
232
|
EndoplasmicReticulum _endoplasmicReticulum;
|
|
228
233
|
|
|
@@ -262,10 +267,6 @@ inline const EndoplasmicReticulum& Morphology::endoplasmicReticulum() const noex
|
|
|
262
267
|
return _endoplasmicReticulum;
|
|
263
268
|
}
|
|
264
269
|
|
|
265
|
-
inline const std::vector<Property::Annotation>& Morphology::annotations() const noexcept {
|
|
266
|
-
return _annotations;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
270
|
inline const std::shared_ptr<Section>& Morphology::section(uint32_t id) const {
|
|
270
271
|
return _sections.at(id);
|
|
271
272
|
}
|
|
@@ -274,6 +275,14 @@ inline SomaType Morphology::somaType() const noexcept {
|
|
|
274
275
|
return _soma->type();
|
|
275
276
|
}
|
|
276
277
|
|
|
278
|
+
inline const std::vector<Property::Annotation>& Morphology::annotations() const noexcept {
|
|
279
|
+
return _cellProperties->_annotations;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
inline const std::vector<Property::Marker>& Morphology::markers() const noexcept {
|
|
283
|
+
return _cellProperties->_markers;
|
|
284
|
+
}
|
|
285
|
+
|
|
277
286
|
inline CellFamily Morphology::cellFamily() const noexcept {
|
|
278
287
|
return _cellProperties->_cellFamily;
|
|
279
288
|
}
|
|
@@ -283,7 +292,11 @@ inline MorphologyVersion Morphology::version() const noexcept {
|
|
|
283
292
|
}
|
|
284
293
|
|
|
285
294
|
inline void Morphology::addAnnotation(const morphio::Property::Annotation& annotation) {
|
|
286
|
-
_annotations.push_back(annotation);
|
|
295
|
+
_cellProperties->_annotations.push_back(annotation);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
inline void Morphology::addMarker(const morphio::Property::Marker& marker) {
|
|
299
|
+
_cellProperties->_markers.push_back(marker);
|
|
287
300
|
}
|
|
288
301
|
|
|
289
302
|
} // namespace mut
|
|
@@ -145,11 +145,17 @@ struct Annotation {
|
|
|
145
145
|
std::string _details;
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
+
struct Marker {
|
|
149
|
+
PointLevel _pointLevel;
|
|
150
|
+
std::string _label;
|
|
151
|
+
};
|
|
152
|
+
|
|
148
153
|
struct CellLevel {
|
|
149
154
|
morphio::CellFamily _cellFamily;
|
|
150
155
|
SomaType _somaType;
|
|
151
156
|
MorphologyVersion _version;
|
|
152
|
-
std::vector<Annotation>
|
|
157
|
+
std::vector<Annotation> _annotations;
|
|
158
|
+
std::vector<Marker> _markers;
|
|
153
159
|
|
|
154
160
|
bool diff(const CellLevel& other, LogLevel logLevel) const;
|
|
155
161
|
bool operator==(const CellLevel& other) const;
|
|
@@ -172,8 +178,6 @@ struct Properties {
|
|
|
172
178
|
|
|
173
179
|
EndoplasmicReticulumLevel _endoplasmicReticulumLevel;
|
|
174
180
|
|
|
175
|
-
std::vector<Annotation> _annotations;
|
|
176
|
-
|
|
177
181
|
////////////////////////////////////////////////////////////////////////////////
|
|
178
182
|
// Functions
|
|
179
183
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -74,7 +74,11 @@ const EndoplasmicReticulum Morphology::endoplasmicReticulum() const {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const std::vector<Property::Annotation>& Morphology::annotations() const {
|
|
77
|
-
return _properties->_annotations;
|
|
77
|
+
return _properties->_cellLevel._annotations;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const std::vector<Property::Marker>& Morphology::markers() const {
|
|
81
|
+
return _properties->_cellLevel._markers;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
Section Morphology::section(uint32_t id) const {
|
|
@@ -46,7 +46,6 @@ Morphology::Morphology(const morphio::Morphology& morphology, unsigned int optio
|
|
|
46
46
|
_cellProperties = std::make_shared<morphio::Property::CellLevel>(
|
|
47
47
|
morphology._properties->_cellLevel);
|
|
48
48
|
|
|
49
|
-
_annotations = morphology.annotations();
|
|
50
49
|
for (const morphio::Section& root : morphology.rootSections()) {
|
|
51
50
|
appendRootSection(root, true);
|
|
52
51
|
}
|
|
@@ -262,10 +261,8 @@ Property::Properties Morphology::buildReadOnly() const {
|
|
|
262
261
|
std::map<uint32_t, int32_t> newIds;
|
|
263
262
|
Property::Properties properties{};
|
|
264
263
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
properties._cellLevel._somaType = _soma->type();
|
|
268
|
-
}
|
|
264
|
+
properties._cellLevel = *_cellProperties;
|
|
265
|
+
properties._cellLevel._somaType = _soma->type();
|
|
269
266
|
_appendProperties(properties._somaLevel, _soma->_pointProperties);
|
|
270
267
|
|
|
271
268
|
for (auto it = depth_begin(); it != depth_end(); ++it) {
|
|
@@ -281,7 +278,6 @@ Property::Properties Morphology::buildReadOnly() const {
|
|
|
281
278
|
}
|
|
282
279
|
|
|
283
280
|
mitochondria()._buildMitochondria(properties);
|
|
284
|
-
properties._annotations = annotations();
|
|
285
281
|
properties._endoplasmicReticulumLevel = endoplasmicReticulum().buildReadOnly();
|
|
286
282
|
return properties;
|
|
287
283
|
}
|
|
@@ -32,6 +32,8 @@ enum class Token {
|
|
|
32
32
|
|
|
33
33
|
// Special WORDS
|
|
34
34
|
COLOR = 101,
|
|
35
|
+
FONT,
|
|
36
|
+
MARKER,
|
|
35
37
|
RGB,
|
|
36
38
|
|
|
37
39
|
// end of branch weirdness
|
|
@@ -77,6 +79,8 @@ inline std::string to_string(Token t) {
|
|
|
77
79
|
T(DENDRITE)
|
|
78
80
|
T(CELLBODY)
|
|
79
81
|
T(COLOR)
|
|
82
|
+
T(FONT)
|
|
83
|
+
T(MARKER)
|
|
80
84
|
T(RGB)
|
|
81
85
|
T(GENERATED)
|
|
82
86
|
T(HIGH)
|
|
@@ -151,13 +155,24 @@ class NeurolucidaLexer
|
|
|
151
155
|
rules_.push("\\|", +Token::PIPE);
|
|
152
156
|
|
|
153
157
|
rules_.push("Color", +Token::COLOR);
|
|
158
|
+
rules_.push("Font", +Token::FONT);
|
|
154
159
|
|
|
155
160
|
rules_.push("Axon", +Token::AXON);
|
|
156
161
|
rules_.push("Apical", +Token::APICAL);
|
|
157
162
|
rules_.push("Dendrite", +Token::DENDRITE);
|
|
158
|
-
// rules_.push("\\\"CellBody\\\"", +Token::CELLBODY);
|
|
159
163
|
rules_.push("CellBody", +Token::CELLBODY);
|
|
160
164
|
|
|
165
|
+
rules_.push("Dot", +Token::MARKER);
|
|
166
|
+
rules_.push("FilledCircle", +Token::MARKER);
|
|
167
|
+
rules_.push("SnowFlake", +Token::MARKER);
|
|
168
|
+
rules_.push("Asterisk", +Token::MARKER);
|
|
169
|
+
rules_.push("OpenCircle", +Token::MARKER);
|
|
170
|
+
rules_.push("OpenStar", +Token::MARKER);
|
|
171
|
+
rules_.push("Flower", +Token::MARKER);
|
|
172
|
+
rules_.push("OpenSquare", +Token::MARKER);
|
|
173
|
+
rules_.push("FilledStar", +Token::MARKER);
|
|
174
|
+
rules_.push("DoubleCircle", +Token::MARKER);
|
|
175
|
+
|
|
161
176
|
rules_.push("Generated", +Token::GENERATED);
|
|
162
177
|
rules_.push("High", +Token::HIGH);
|
|
163
178
|
rules_.push("Incomplete", +Token::INCOMPLETE);
|
|
@@ -254,9 +269,13 @@ class NeurolucidaLexer
|
|
|
254
269
|
}
|
|
255
270
|
}
|
|
256
271
|
|
|
272
|
+
void consume_until(Token endpoint) {
|
|
273
|
+
while (consume()->id != +endpoint)
|
|
274
|
+
;
|
|
275
|
+
}
|
|
276
|
+
|
|
257
277
|
// advance iterator until sexp is consumed, including final paren
|
|
258
278
|
void consume_until_balanced_paren() {
|
|
259
|
-
expect(Token::LPAREN, "consume_until_balanced_paren should start in LPAREN");
|
|
260
279
|
size_t opening_count = 1;
|
|
261
280
|
while (opening_count != 0) {
|
|
262
281
|
size_t id = consume()->id;
|
|
@@ -13,6 +13,18 @@ namespace readers {
|
|
|
13
13
|
namespace asc {
|
|
14
14
|
namespace {
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
Contain header info about the root S-exps
|
|
18
|
+
**/
|
|
19
|
+
struct Header {
|
|
20
|
+
Header()
|
|
21
|
+
: token(static_cast<Token>(+Token::STRING))
|
|
22
|
+
, parent_id(-1) {}
|
|
23
|
+
Token token;
|
|
24
|
+
std::string label;
|
|
25
|
+
int32_t parent_id;
|
|
26
|
+
};
|
|
27
|
+
|
|
16
28
|
bool is_eof(Token type) {
|
|
17
29
|
return type == Token::EOF_;
|
|
18
30
|
}
|
|
@@ -33,9 +45,9 @@ bool is_end_of_section(Token id) {
|
|
|
33
45
|
}
|
|
34
46
|
|
|
35
47
|
bool skip_sexp(size_t id) {
|
|
36
|
-
return (id == +Token::WORD || id == +Token::
|
|
37
|
-
id == +Token::
|
|
38
|
-
id == +Token::
|
|
48
|
+
return (id == +Token::WORD || id == +Token::COLOR || id == +Token::GENERATED ||
|
|
49
|
+
id == +Token::HIGH || id == +Token::INCOMPLETE || id == +Token::LOW ||
|
|
50
|
+
id == +Token::NORMAL || id == +Token::FONT);
|
|
39
51
|
}
|
|
40
52
|
} // namespace
|
|
41
53
|
|
|
@@ -44,7 +56,7 @@ class NeurolucidaParser
|
|
|
44
56
|
public:
|
|
45
57
|
explicit NeurolucidaParser(const std::string& uri)
|
|
46
58
|
: uri_(uri)
|
|
47
|
-
, lex_(uri)
|
|
59
|
+
, lex_(uri, false)
|
|
48
60
|
, debugInfo_(uri)
|
|
49
61
|
, err_(uri) {}
|
|
50
62
|
|
|
@@ -58,7 +70,7 @@ class NeurolucidaParser
|
|
|
58
70
|
|
|
59
71
|
lex_.start_parse(input);
|
|
60
72
|
|
|
61
|
-
|
|
73
|
+
parse_root_sexps();
|
|
62
74
|
|
|
63
75
|
return nb_;
|
|
64
76
|
}
|
|
@@ -90,12 +102,12 @@ class NeurolucidaParser
|
|
|
90
102
|
return std::tuple<Point, floatType>({point[0], point[1], point[2]}, point[3]);
|
|
91
103
|
}
|
|
92
104
|
|
|
93
|
-
bool parse_neurite_branch(
|
|
105
|
+
bool parse_neurite_branch(Header& header) {
|
|
94
106
|
lex_.consume(Token::LPAREN, "New branch should start with LPAREN");
|
|
95
107
|
|
|
96
108
|
bool ret = true;
|
|
97
109
|
while (true) {
|
|
98
|
-
ret &= parse_neurite_section(
|
|
110
|
+
ret &= parse_neurite_section(header);
|
|
99
111
|
if (lex_.ended() ||
|
|
100
112
|
(lex_.current()->id != +Token::PIPE && lex_.current()->id != +Token::LPAREN)) {
|
|
101
113
|
break;
|
|
@@ -106,8 +118,7 @@ class NeurolucidaParser
|
|
|
106
118
|
return ret;
|
|
107
119
|
}
|
|
108
120
|
|
|
109
|
-
int32_t _create_soma_or_section(
|
|
110
|
-
int32_t parent_id,
|
|
121
|
+
int32_t _create_soma_or_section(const Header& header,
|
|
111
122
|
std::vector<Point>& points,
|
|
112
123
|
std::vector<morphio::floatType>& diameters) {
|
|
113
124
|
lex_.current_section_start_ = lex_.line_num();
|
|
@@ -115,24 +126,30 @@ class NeurolucidaParser
|
|
|
115
126
|
morphio::Property::PointLevel properties;
|
|
116
127
|
properties._points = points;
|
|
117
128
|
properties._diameters = diameters;
|
|
118
|
-
if (token == Token::
|
|
129
|
+
if (header.token == Token::STRING) {
|
|
130
|
+
Property::Marker marker;
|
|
131
|
+
marker._pointLevel = properties;
|
|
132
|
+
marker._label = header.label;
|
|
133
|
+
nb_.addMarker(marker);
|
|
134
|
+
return_id = -1;
|
|
135
|
+
} else if (header.token == Token::CELLBODY) {
|
|
119
136
|
if (!nb_.soma()->points().empty())
|
|
120
137
|
throw SomaError(err_.ERROR_SOMA_ALREADY_DEFINED(lex_.line_num()));
|
|
121
138
|
nb_.soma()->properties() = properties;
|
|
122
|
-
|
|
123
139
|
return_id = -1;
|
|
124
140
|
} else {
|
|
125
|
-
SectionType section_type = TokenSectionTypeMap.at(token);
|
|
126
|
-
insertLastPointParentSection(parent_id, properties, diameters);
|
|
127
|
-
|
|
128
|
-
// Condition to remove
|
|
129
|
-
// See test_single_point_section_duplicate_parent for an
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
SectionType section_type = TokenSectionTypeMap.at(header.token);
|
|
142
|
+
insertLastPointParentSection(header.parent_id, properties, diameters);
|
|
143
|
+
|
|
144
|
+
// Condition to remove single point section that duplicate parent
|
|
145
|
+
// point See test_single_point_section_duplicate_parent for an
|
|
146
|
+
// example
|
|
147
|
+
if (header.parent_id > -1 && properties._points.size() == 1) {
|
|
148
|
+
return_id = header.parent_id;
|
|
132
149
|
} else {
|
|
133
150
|
std::shared_ptr<morphio::mut::Section> section;
|
|
134
|
-
if (parent_id > -1)
|
|
135
|
-
section = nb_.section(static_cast<unsigned int>(parent_id))
|
|
151
|
+
if (header.parent_id > -1)
|
|
152
|
+
section = nb_.section(static_cast<unsigned int>(header.parent_id))
|
|
136
153
|
->appendSection(properties, section_type);
|
|
137
154
|
else
|
|
138
155
|
section = nb_.appendRootSection(properties, section_type);
|
|
@@ -189,7 +206,56 @@ class NeurolucidaParser
|
|
|
189
206
|
properties._diameters.insert(properties._diameters.begin(), childSectionNextDiameter);
|
|
190
207
|
}
|
|
191
208
|
|
|
192
|
-
|
|
209
|
+
/**
|
|
210
|
+
Parse the root sexp until finding the first sexp containing numbers
|
|
211
|
+
**/
|
|
212
|
+
Header parse_root_sexp_header() {
|
|
213
|
+
Header header;
|
|
214
|
+
|
|
215
|
+
while (true) {
|
|
216
|
+
const Token id = static_cast<Token>(lex_.current()->id);
|
|
217
|
+
const size_t peek_id = lex_.peek()->id;
|
|
218
|
+
|
|
219
|
+
if (is_eof(id)) {
|
|
220
|
+
throw RawDataError(err_.ERROR_EOF_IN_NEURITE(lex_.line_num()));
|
|
221
|
+
} else if (id == Token::MARKER) {
|
|
222
|
+
lex_.consume();
|
|
223
|
+
} else if (id == Token::WORD) {
|
|
224
|
+
lex_.consume_until_balanced_paren();
|
|
225
|
+
lex_.consume(Token::LPAREN);
|
|
226
|
+
} else if (id == Token::STRING) {
|
|
227
|
+
header.label = lex_.current()->str();
|
|
228
|
+
// Get rid of quotes
|
|
229
|
+
header.label = header.label.substr(1, header.label.size() - 2);
|
|
230
|
+
lex_.consume();
|
|
231
|
+
} else if (id == Token::RPAREN) {
|
|
232
|
+
return header;
|
|
233
|
+
} else if (id == Token::LPAREN) {
|
|
234
|
+
if (skip_sexp(peek_id)) {
|
|
235
|
+
// skip words/strings/markers
|
|
236
|
+
lex_.consume_until_balanced_paren();
|
|
237
|
+
if (peek_id == +Token::FONT)
|
|
238
|
+
lex_.consume_until_balanced_paren();
|
|
239
|
+
} else if (is_neurite_type(static_cast<Token>(peek_id))) {
|
|
240
|
+
header.token = static_cast<Token>(peek_id);
|
|
241
|
+
lex_.consume(); // Advance to NeuriteType
|
|
242
|
+
lex_.consume();
|
|
243
|
+
lex_.consume(Token::RPAREN, "New Neurite should end in RPAREN");
|
|
244
|
+
} else if (peek_id == +Token::NUMBER) {
|
|
245
|
+
return header;
|
|
246
|
+
} else {
|
|
247
|
+
throw RawDataError(
|
|
248
|
+
err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.peek()->str()));
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
throw RawDataError(
|
|
252
|
+
err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.current()->str()));
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
bool parse_neurite_section(Header header) {
|
|
193
259
|
Points points;
|
|
194
260
|
std::vector<morphio::floatType> diameters;
|
|
195
261
|
auto section_id = static_cast<int>(nb_.sections().size());
|
|
@@ -202,7 +268,7 @@ class NeurolucidaParser
|
|
|
202
268
|
throw RawDataError(err_.ERROR_EOF_IN_NEURITE(lex_.line_num()));
|
|
203
269
|
} else if (is_end_of_section(id)) {
|
|
204
270
|
if (!points.empty()) {
|
|
205
|
-
_create_soma_or_section(
|
|
271
|
+
_create_soma_or_section(header, points, diameters);
|
|
206
272
|
}
|
|
207
273
|
return true;
|
|
208
274
|
} else if (is_end_of_branch(id)) {
|
|
@@ -225,9 +291,11 @@ class NeurolucidaParser
|
|
|
225
291
|
diameters.push_back(radius);
|
|
226
292
|
} else if (peek_id == +Token::LPAREN) {
|
|
227
293
|
if (!points.empty()) {
|
|
228
|
-
section_id = _create_soma_or_section(
|
|
294
|
+
section_id = _create_soma_or_section(header, points, diameters);
|
|
229
295
|
}
|
|
230
|
-
|
|
296
|
+
Header child_header = header;
|
|
297
|
+
child_header.parent_id = section_id;
|
|
298
|
+
parse_neurite_branch(child_header);
|
|
231
299
|
} else {
|
|
232
300
|
throw RawDataError(
|
|
233
301
|
err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.peek()->str()));
|
|
@@ -238,24 +306,20 @@ class NeurolucidaParser
|
|
|
238
306
|
}
|
|
239
307
|
}
|
|
240
308
|
|
|
241
|
-
|
|
309
|
+
void parse_root_sexps() {
|
|
242
310
|
// parse the top level blocks, and if they are a neurite, otherwise skip
|
|
243
311
|
while (!lex_.ended()) {
|
|
244
|
-
|
|
245
|
-
if (is_neurite_type(peek_id)) {
|
|
246
|
-
lex_.consume(); // Advance to NeuriteType
|
|
247
|
-
const auto current_id = static_cast<Token>(lex_.current()->id);
|
|
248
|
-
|
|
312
|
+
if (static_cast<Token>(lex_.current()->id) == Token::LPAREN) {
|
|
249
313
|
lex_.consume();
|
|
250
|
-
|
|
251
|
-
|
|
314
|
+
Header header = parse_root_sexp_header();
|
|
315
|
+
if (lex_.current()->id != +Token::RPAREN) {
|
|
316
|
+
parse_neurite_section(header);
|
|
317
|
+
}
|
|
252
318
|
}
|
|
253
319
|
|
|
254
320
|
if (!lex_.ended())
|
|
255
321
|
lex_.consume();
|
|
256
322
|
}
|
|
257
|
-
|
|
258
|
-
return true;
|
|
259
323
|
}
|
|
260
324
|
|
|
261
325
|
morphio::mut::Morphology nb_;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
; V3 text file written for MicroBrightField products.
|
|
2
|
+
(ImageCoords)
|
|
3
|
+
|
|
4
|
+
("pia"
|
|
5
|
+
(Closed)
|
|
6
|
+
(MBFObjectType 5)
|
|
7
|
+
(0 1 2 3)
|
|
8
|
+
(3 4 5 4)
|
|
9
|
+
(6 7 8 5)
|
|
10
|
+
(9 10 11 6)
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
("layer1-2"
|
|
14
|
+
(Color RGB (255, 251, 255))
|
|
15
|
+
(GUID "11594A5D0D7646B580E877CB40957E07")
|
|
16
|
+
(MBFObjectType 5)
|
|
17
|
+
(Resolution 1.846036)
|
|
18
|
+
( 983.07 455.36 -0.19 0.15) ; 2, 10
|
|
19
|
+
( 1192.31 420.35 -0.19 0.15) ; 2, 11
|
|
20
|
+
) ; End of contour
|
|
21
|
+
|
|
22
|
+
("CellBody"
|
|
23
|
+
(Color Red)
|
|
24
|
+
(CellBody)
|
|
25
|
+
( -3.69 14.30 2.81 0.22) ; 8, 1
|
|
26
|
+
( -3.97 12.63 2.69 0.22) ; 8, 2
|
|
27
|
+
( -4.02 11.32 2.44 0.22) ; 8, 3
|
|
28
|
+
( -3.85 9.84 2.19 0.22) ; 8, 4
|
|
29
|
+
( -3.76 8.09 2.13 0.22) ; 8, 5
|
|
30
|
+
) ; End of contour
|
|
31
|
+
|
|
32
|
+
( (Color Blue)
|
|
33
|
+
(Axon)
|
|
34
|
+
( -2.87 -9.24 -5.06 1.47) ; Root
|
|
35
|
+
( -2.76 -10.41 -5.13 1.47) ; 1, R
|
|
36
|
+
( -2.03 -12.48 -5.13 1.25) ; 2
|
|
37
|
+
( -1.62 -13.30 -5.56 1.25) ; 3
|
|
38
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
; Same file as simple.asc but with a (Sections) block
|
|
2
|
+
|
|
3
|
+
; V3 text file written for MicroBrightField products.
|
|
4
|
+
(Sections S1 "576985993_0003" 3 100 0
|
|
5
|
+
S2 "576985993_0013" 103 100 0
|
|
6
|
+
S3 "576985993_0023" 203 100 0
|
|
7
|
+
S4 "576985993_0033" 303 100 0
|
|
8
|
+
S5 "576985993_0043" 403 100 0
|
|
9
|
+
S6 "576985993_0053" 503 100 0
|
|
10
|
+
S7 "576985993_0063" 603 100 0
|
|
11
|
+
) ; End of Sections
|
|
12
|
+
|
|
13
|
+
("CellBody"
|
|
14
|
+
(Color Red)
|
|
15
|
+
(CellBody)
|
|
16
|
+
(0 0 0 2)
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
((Dendrite)
|
|
20
|
+
(0 0 0 2)
|
|
21
|
+
(0 5 0 2)
|
|
22
|
+
(
|
|
23
|
+
(-5 5 0 3)
|
|
24
|
+
|
|
|
25
|
+
(6 5 0 3)
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
((Axon)
|
|
31
|
+
(0 0 0 2)
|
|
32
|
+
(0 -4 0 2)
|
|
33
|
+
(
|
|
34
|
+
(6 -4 0 4)
|
|
35
|
+
|
|
|
36
|
+
(-5 -4 0 4)
|
|
37
|
+
)
|
|
38
|
+
)
|