morphio 2.6.1__tar.gz → 2.6.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.6.1 → MorphIO-2.6.2}/MorphIO.egg-info/PKG-INFO +3 -1
- {MorphIO-2.6.1 → MorphIO-2.6.2}/MorphIO.egg-info/SOURCES.txt +1 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/PKG-INFO +3 -1
- {MorphIO-2.6.1 → MorphIO-2.6.2}/README.md +2 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/morphologyASC.cpp +18 -8
- MorphIO-2.6.2/tests/data/marker-with-string.asc +12 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_2_neurolucida.py +5 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.clang-format +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.github/workflows/clang_format_check.yaml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.github/workflows/publish-sdist-wheels.yml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.github/workflows/run-tests.yml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.gitignore +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.gitmodules +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/.travis.yml +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/3rdparty/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/CHANGLOG.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/CMake/CompilerFlags.cmake +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/CMake/MorphIOConfig.cmake +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/CONTRIBUTING.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/COPYING +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/COPYING.LESSER +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/MANIFEST.in +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/MorphIO.egg-info/dependency_links.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/MorphIO.egg-info/not-zip-safe +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/MorphIO.egg-info/requires.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/MorphIO.egg-info/top_level.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_enums.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_immutable.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_immutable.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_misc.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_misc.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_mutable.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_mutable.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_vasculature.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bind_vasculature.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bindings_utils.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/bindings_utils.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/binds/python/morphio.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/ci/check_clang_format.sh +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/ci/cpp_test.sh +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/ci/python_test.sh +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/doc/BBPLOGO350.jpg +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/doc/specification.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/doc/specification_neurolucida.md +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/examples/getting_started.ipynb +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/examples/getting_started_mutable.ipynb +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/enums.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/errorMessages.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/exceptions.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/glial_cell.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mito_section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mitochondria.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/morphology.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/glial_cell.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/mito_section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/mitochondria.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/modifiers.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/morphology.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/soma.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/mut/writers.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/properties.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/section_base.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/section_base.tpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/section_iterators.hpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/shared_utils.tpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/soma.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/tools.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/types.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/vasc/iterators.hpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/vasc/properties.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/vasc/section.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/vasc/vasculature.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/vector_types.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/include/morphio/version.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/morphio/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/morphio/mut/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/morphio/vasculature/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/scripts/check-clang-format-all +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/setup.cfg +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/setup.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/enums.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/errorMessages.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/glial_cell.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mito_section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mitochondria.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/morphology.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/glial_cell.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/mito_section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/mitochondria.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/modifiers.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/morphology.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/soma.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/mut/writers.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/properties.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/lex.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/morphologyASC.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/morphologyHDF5.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/morphologyHDF5.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/morphologySWC.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/morphologySWC.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/utilsHDF5.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/vasculatureHDF5.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/readers/vasculatureHDF5.h +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/soma.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/vasc/properties.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/vasc/section.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/vasc/vasculature.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/vector_utils.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/src/version.cpp.in +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/CMakeLists.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/__init__.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/contrib/catch.hpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/astrocyte.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/circle_contour.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/complexe.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/disconnected_neurite.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/merged.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/Neuron.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/endoplasmic-reticulum.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/mitochondria.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/monodim.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/simple-broken-section-type.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/simple-negative-section-type.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/simple.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/soma_no_neurites.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v1/two_child_unmerged.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/v2/Neuron.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/vasculature-broken-section-type.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/vasculature1.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/h5/vasculature2.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/iterators.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/mono-type.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/multiple_point_section.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/multiple_soma.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/nested_single_children.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/neurite_wrong_root_point.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/nrn-order-already-sorted.h5 +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/nrn_ordering.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/pia.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/reversed_NRN_neurite_order.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/sections-block.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/simple-with-font.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/simple-with-image-coord.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/simple.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/simple.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/simple2.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/soma_cylinders.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/soma_multiple_frustums.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/soma_single_frustum.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/soma_three_points_cylinder.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/spine.asc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/data/three_point_soma.swc +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/main.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/requirement_tests.txt +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_0_API.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_10_vasculature.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_1_swc.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_3_h5.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_4_immut.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_5_mut.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_6_writers.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_7_modifiers.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_8_all_morphologies.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_9_surfaces.py +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/test_morphology.cpp +0 -0
- {MorphIO-2.6.1 → MorphIO-2.6.2}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MorphIO
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.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
|
|
@@ -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.6.
|
|
3
|
+
Version: 2.6.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
|
|
@@ -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
|
|
@@ -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
|
}
|
|
@@ -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
|
+
)
|
|
@@ -700,3 +700,8 @@ 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))
|
|
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
|
|
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
|