Specification Neurolucida¶
Because there is no official Neurolucida specification, this page aims to fill this gap, and provides a subjective specification of the format.
Soma¶
Files without a soma are valid.
Multiple soma ASC files with multiple CellBody tags will raise an error. Unit test
Duplicate points¶
When reading an ASC file, the last point of a section will be added as the first point of the child sections if not already present. That means these two representations are equivalent:
( (Dendrite)
(3 -4 0 2)
(3 -10 0 2)
(
(0 -10 0 2)
(-3 -10 0 2)
|
(6 -10 0 2)
(9 -10 0 2)
)
)
( (Dendrite)
(3 -4 0 2)
(3 -10 0 2)
(
(3 -10 0 2) ; <- duplicate
(0 -10 0 2)
(-3 -10 0 2)
|
(3 -10 0 2) ; <- duplicate
(6 -10 0 2)
(9 -10 0 2)
)
)
Note: As of today, it is OK for a duplicated point to have a different radius than the original point.
When writing the file the duplicate point is not automatically added. However, a warning will be displayed if the first point of a section differs from the last point of the previous section.
Single point section¶
A section made of only one point will be treated differently depending on whether the point is a duplicate of the parent section last point or not.
If it is a duplicate, the section is discarded. Example:
((Dendrite) (3 -4 0 2) (3 -10 0 2) ( (3 -10 0 2) ; duplicate point ) )
will become:
((Dendrite) (3 -4 0 2) (3 -10 0 2) )
See here and here for a more complex case
- If the point is not a duplicate, then the duplicate point is prepended at the beggining of
the section and the section is considered perfectly valid. See here
((Dendrite) (3 -4 0 2) (3 -10 0 2) ( (3 -100 100 4) ; not a duplicate point ) )
will be equivalent to:
((Dendrite) (3 -4 0 2) (3 -10 0 2) ( (3 -10 0 2) ; added duplicate (3 -100 100 4) ) )
Single child section¶
Section with only one child section will have their child merged with.
((Dendrite)
(3 -4 0 2)
(3 -6 0 2)
(3 -8 0 2)
(3 -10 0 2)
(
(3 -10 0 2) ; merged with parent section
(0 -10 0 2) ; merged with parent section
(-3 -15 0 2) ; merged with parent section
(
(-5 -5 5 5)
|
(-6 -6 6 6)
)
)
)
will be interpreted the same as:
((Dendrite)
(3 -4 0 2)
(3 -6 0 2)
(3 -8 0 2)
(3 -10 0 2)
(0 -10 0 2)
(-3 -15 0 2)
(
(-5 -5 5 5)
|
(-6 -6 6 6)
)
)
Empty siblings¶
File with empty siblings are handled correctly:
((Dendrite)
(3 -4 0 2)
(3 -6 0 2)
(3 -8 0 2)
(3 -10 0 2)
(
(3 -10 0 2)
(0 -10 0 2)
(-3 -10 0 2)
| ; <-- empty sibling but still works
)
)
will be interpreted the same as:
((Dendrite)
(3 -4 0 2)
(3 -6 0 2)
(3 -8 0 2)
(3 -10 0 2)
(0 -10 0 2)
)