Conversation
f857bf6 to
e7fbd40
Compare
src/readers/morphologyHDF5.cpp
Outdated
| if (metadata.hasAttribute(_a_version)) { | ||
| const auto attr = metadata.getAttribute(_a_version); | ||
|
|
||
| std::array<uint32_t, 2> versions; |
There was a problem hiding this comment.
This is not initialized and I am not familiar with HighFive but shouldn't we init to something like : 0, 0 ?
src/readers/morphologyHDF5.cpp
Outdated
| if (vec.size() > 0) { | ||
| _points->read(vec.front().data()); | ||
| if (hasNeurites) { | ||
| const size_t size = (points.size() + hd5fData.size() - section_offset); |
There was a problem hiding this comment.
same for points.size() it should/must be 0 no ?
|
I made the changes I proposed in : If you are ok with this PR above we can merge both. |
|
Currently I have problems with hdf morphologies that have its soma points split among several offsets in structure: The 2nd half of soma is skipped and soma type is undefined. Should I be worried about this case when soma is represented by multiple offsets? |
|
Do we have specs on that ? To me without more specs (like: " we can have only one soma"), this is an undefined behavior an we should raise because we cannot figure out if this is double soma morphology (one single point soma and one cylinder soma) or if this is a poorly formatted 3 points soma. |
There is something: "Soma: there is only one soma section, however, different tools interpret them differently:" (c). I propose to throw en exception for this case as we don't throw currently on the latest master branch. |
|
Ok so we throw. I will update the code |
|
Added a check here to ensure a single section soma and the soma being the first section: |
* make which datasets belong to which versions more clear
* don't use try/catch to detect if datasets exist
* try and clarify where member variables are read & saved
* removed member variables _points, _pointsDims, _sections,
since their locality can be kept local
* fix version numbering in tests/data/h5/v1/endoplasmic-reticulum.h5
mitochondria.h5
* remove unnecessary `morphio::`
* Fix the no soma h5 morphologies * wrong type for the structure * fix data again * Remove the size necessarily equal to zero. * remove cassert * Multiple sections soma
2a888cf to
60f695a
Compare
|
I put you as a reviewer but this is more to know if you have something to add or comment @asanin-epfl |
|
From my side looks fine. I'm working on docs update currently, so it's good for me. Also a question, should be a similar PR for the ASC reader? |
* test for extra somas/out of order during traversal of sections * 100 % coverage * added explicit glia tests
| bool hasSoma = true; | ||
| if (static_cast<SectionType>(vec[0][SECTION_TYPE]) != SECTION_SOMA) { | ||
| hasSoma = false; | ||
| } else if (vec.size() == 1) { |
|
I also tested it w/ NeuroM d177237, as cross check. |
since their locality can be kept local
mitochondria.h5
morphio::