Stitch multiple fragments into single neuron using nearest endpoints
stitch_neurons(x, prefer_soma = TRUE, sort = TRUE, warndist = 1000)
A single neuron
object containing all input fragments.
Neurons will be ordered by default such the largest (by node count)
neuron with a soma tag is the master
neuron - i.e. the one
containing the root node. Fragments are joined recursively in this sort
order each time simply picking the closest fragment to the current
master. Closest is here defined by the distance between nearest
endpoints.
## Not run: ------------------------------------ # pn57334=read.neurons.catmaid("name:PN 57334") # # there were 3 fragments when I wrote this that all contained PN 57334 in # # their name # length(pn57334) # summary(pn57334) # pn57334.whole=stitch_neurons(pn57334) # summary(pn57334.whole) # plot3d(pn57334.whole) ## ---------------------------------------------