BlueBrain / NeuroR

A collection of tools to repair morphologies
https://neuror.readthedocs.io/
GNU Lesser General Public License v3.0
9 stars 7 forks source link

Sanitize deletes all children sections when parent section (non-soma) is zero #105

Closed mgeplf closed 2 years ago

mgeplf commented 2 years ago

This is a continuation of #99 Running neuror sanitize file simple1.asc out.asc on

("CellBody"
  (Color Red)
  (CellBody)
  (0.001000000 0.001000000 0.000000000 0.010000000)
  (-0.001000000 0.001000000 0.000000000 0.010000000)
  (-0.001000000 -0.001000000 0.000000000 0.010000000)
  (0.001000000 -0.001000000 0.000000000 0.010000000)
)

( (Color Cyan)
  (Axon)
  (0.000000000 0.000000000 0.000000000 2.000000000)
  (0.000000000 -4.000000000 0.000000000 2.000000000)
  (
    (0.000000000 -4.000000000 0.000000000 4.000000000)
    (0.000000000 -4.000000000 0.000000000 4.000000000)
    (0.000000000 -4.000000000 0.000000000 4.000000000)
    (
        (6.000000000 -4.000000000 0.000000000 4.000000000)
        (7.000000000 -5.000000000 0.000000000 4.000000000)
    |
        (6.000000000 -4.000000000 0.000000000 4.000000000)
        (8.000000000 -4.000000000 0.000000000 4.000000000)
    )
  |
    (0.000000000 -4.000000000 0.000000000 4.000000000)
    (-5.000000000 -4.000000000 0.000000000 4.000000000)
  )
)

Which results in:

[...snip cellbody]
( (Color Cyan)
  (Axon)
  (0.000000000 0.000000000 0.000000000 2.000000000)
  (0.000000000 -4.000000000 0.000000000 2.000000000)
  (
    (0.000000000 -4.000000000 0.000000000 4.000000000)
    (-5.000000000 -4.000000000 0.000000000 4.000000000)
  )
)

and doesn't have the correct subtree.

eleftherioszisis commented 2 years ago

Addressed in #107.