arbor
arbor copied to clipboard
Redefine root location
Currently (root)
returns (location 0 0)
, which is the proximal end of the first segment.
However, multiple segments and branches can be at the root, i.e. have arb::mnpos
as their parent, so we should have a (root)
location that expresses the common root of all these.
I think that (root) = (mnpos 1)
is a good value for this.
Discussion points:
- is
(mnpos 1)
a good way to represent this - should it be called
(root)
, or something else? I vote for calling it root.
I think (location mnpos 1)
is a good way to represent it. In terms of implementation, should we make the branch id a signed integer, or special case the comparisons?
On calling it root
, I'm a bit worried that this might be confusing: it's not a point on the morphology (you can't stick a current clamp there, for example), and it doesn't correspond to e.g. the first point in an SWC file. I think origin
or least
or bottom
might be safer options.
Regarding the semantics: is this point included in reg::all()
or completions of regions that include the proximal points of top-level branches?
- If it is, then
all
will give a connected cell; otherwise it depends on whether or not we have multiple top-level branches. - On the other hand, if it is included, then the result of
most-proximal
on e.g.all
will give a locset containing just this point, which isn't a valid location for placement of anything.
Hmm, the problem of placement can be resolved in the discretization; allowing stuff to be placed there is not the issue I thought it was.
Consensus: can't place anything on (location mnpos 1)
, and say that (location mnpos x)
for x ≠ 1 is simply invalid.
@bcumming ping
Hi,
I am a bit late to the party, but wouldn't most issues be resolved by making (root)
return
{ (location k 0) | branch k has parent=mnpos }
. Thus, (root)
is the dual of (terminal)
.