Skip to content

Commit

Permalink
increase allowed section type to 19
Browse files Browse the repository at this point in the history
* #432
* #456 (type 18 seen in the wild)
  • Loading branch information
mgeplf committed Jun 22, 2023
1 parent d6e9733 commit 48163d3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 15 deletions.
9 changes: 9 additions & 0 deletions binds/python/bind_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ void bind_misc(py::module& m) {
.value("custom8", morphio::enums::SectionType::SECTION_CUSTOM_8)
.value("custom9", morphio::enums::SectionType::SECTION_CUSTOM_9)
.value("custom10", morphio::enums::SectionType::SECTION_CUSTOM_10)
.value("custom11", morphio::enums::SectionType::SECTION_CUSTOM_11)
.value("custom12", morphio::enums::SectionType::SECTION_CUSTOM_12)
.value("custom13", morphio::enums::SectionType::SECTION_CUSTOM_13)
.value("custom14", morphio::enums::SectionType::SECTION_CUSTOM_14)
.value("custom15", morphio::enums::SectionType::SECTION_CUSTOM_15)
.value("custom16", morphio::enums::SectionType::SECTION_CUSTOM_16)
.value("custom17", morphio::enums::SectionType::SECTION_CUSTOM_17)
.value("custom18", morphio::enums::SectionType::SECTION_CUSTOM_18)
.value("custom19", morphio::enums::SectionType::SECTION_CUSTOM_19)
.value("glia_perivascular_process",
morphio::enums::SectionType::SECTION_GLIA_PERIVASCULAR_PROCESS)
.value("glia_process", morphio::enums::SectionType::SECTION_GLIA_PROCESS)
Expand Down
30 changes: 24 additions & 6 deletions binds/python/generated/docstrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -831,17 +831,35 @@ static const char *__doc_morphio_enums_SectionType_SECTION_AXON = R"doc(Axon sec

static const char *__doc_morphio_enums_SectionType_SECTION_CNIC_CUSTOM_START = R"doc()doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_10 = R"doc(Custom section type)doc";
static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_10 = R"doc(Custom section type 10)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_5 = R"doc(Custom section type)doc";
static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_11 = R"doc(Custom section type 11)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_6 = R"doc(Custom section type)doc";
static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_12 = R"doc(Custom section type 12)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_7 = R"doc(Custom section type)doc";
static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_13 = R"doc(Custom section type 13)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_8 = R"doc(Custom section type)doc";
static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_14 = R"doc(Custom section type 14)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_9 = R"doc(Custom section type)doc";
static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_15 = R"doc(Custom section type 15)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_16 = R"doc(Custom section type 16)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_17 = R"doc(Custom section type 17)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_18 = R"doc(Custom section type 18)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_19 = R"doc(Custom section type 19)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_5 = R"doc(Custom section type 5)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_6 = R"doc(Custom section type 6)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_7 = R"doc(Custom section type 7)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_8 = R"doc(Custom section type 8)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_CUSTOM_9 = R"doc(Custom section type 9)doc";

static const char *__doc_morphio_enums_SectionType_SECTION_DENDRITE = R"doc(General or basal dendrite (near to soma))doc";

Expand Down
33 changes: 24 additions & 9 deletions include/morphio/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,30 @@ enum SectionType {
SECTION_SPINE_HEAD = 3, // Note: overlaps with SECTION_DENDRITE

// unnamed custom section types
SECTION_CUSTOM_5 = 5, //!< Custom section type
SECTION_CUSTOM_6 = 6, //!< Custom section type
SECTION_CUSTOM_7 = 7, //!< Custom section type
SECTION_CUSTOM_8 = 8, //!< Custom section type
SECTION_CUSTOM_9 = 9, //!< Custom section type
SECTION_CUSTOM_10 = 10, //!< Custom section type
// All section types equal or above this number are invalid custom types according
// to neuromorpho.org standard (http://neuromorpho.org/StdSwc1.21.jsp)
SECTION_OUT_OF_RANGE_START = 11,
SECTION_CUSTOM_5 = 5, //!< Custom section type 5
SECTION_CUSTOM_6 = 6, //!< Custom section type 6
SECTION_CUSTOM_7 = 7, //!< Custom section type 7
SECTION_CUSTOM_8 = 8, //!< Custom section type 8
SECTION_CUSTOM_9 = 9, //!< Custom section type 9
SECTION_CUSTOM_10 = 10, //!< Custom section type 10
// according to neuromorpho.org standard (http://neuromorpho.org/StdSwc1.21.jsp)
// `Codes 5-10 signify custom tags, typically defined in the header of the swc file when used.`

// ... but; we are a bit relaxed, since more is better:
// https:/BlueBrain/MorphIO/issues/432
// https:/BlueBrain/MorphIO/issues/456 (type 18 seen in the wild)
SECTION_CUSTOM_11 = 11, //!< Custom section type 11
SECTION_CUSTOM_12 = 12, //!< Custom section type 12
SECTION_CUSTOM_13 = 13, //!< Custom section type 13
SECTION_CUSTOM_14 = 14, //!< Custom section type 14
SECTION_CUSTOM_15 = 15, //!< Custom section type 15
SECTION_CUSTOM_16 = 16, //!< Custom section type 16
SECTION_CUSTOM_17 = 17, //!< Custom section type 17
SECTION_CUSTOM_18 = 18, //!< Custom section type 18
SECTION_CUSTOM_19 = 19, //!< Custom section type 19

// All section types equal or above this number are invalid custom types
SECTION_OUT_OF_RANGE_START = 20,

// CNIC defined types
// It defines too extra types SWC_SECTION_FORK_POINT and
Expand Down

0 comments on commit 48163d3

Please sign in to comment.