stitch_neuron: Stitch two neurons together at their closest endpoint

View source: R/neuron.R

stitch_neuronR Documentation

Stitch two neurons together at their closest endpoint

Description

Stitch two neurons together at their closest endpoint

Usage

stitch_neuron(a, b)

Arguments

a, b

Neurons to join together

Details

This function joins two neurons at their nearest point (only one). Let's say you have two neurons a and b. a and b will be joined at one point that are closest to each other. However, when say there are multiple points at a and b which are closer and could be joined, then do not use this function, use the function stitch_neurons_mst, which is slower but will merge at multiple points. Note that for CATMAID neurons the neuron with the soma tag will be treated as the first (master neuron). Furthermore in this case the PointNo (aka node id) should already be unique. Otherwise it will be adjusted to ensure this.

Author(s)

Gregory Jefferis jefferis@gmail.com

See Also

stitch_neurons

Examples


dl1_main=simplify_neuron(dl1neuron, n = 1, invert = FALSE)
dl1_branches=simplify_neuron(dl1neuron, n = 1, invert = TRUE)
dl1_whole = stitch_neuron(dl1_main,dl1_branches)


natverse/nat documentation built on Feb. 19, 2024, 7:19 a.m.