R/dotprops.R
prune an object by removing points near (or far) from a target object
prune(x, target, ...) # S3 method for neuron prune(x, target, ...) # S3 method for dotprops prune(x, target, ...) # S3 method for neuronlist prune(x, target, ...) # S3 method for default prune(x, target, maxdist, keep = c("near", "far"), return.indices = FALSE, ...)
x | The object to prune. (e.g. |
---|---|
target | Another object with 3D points that will determine which points in x are kept. |
... | Additional arguments for methods (eventually passed to
|
maxdist | The threshold distance for keeping points |
keep | Whether to keep points in x that are near or far from the target |
return.indices | Whether to return the indices that pass the test rather
than the 3D object/points (default |
prune.neuron
depends on a more basic function
prune_vertices
and is also related to
subset.neuron
.
prune_strahler
, spine
,
prune_vertices
Other neuron: neuron
, ngraph
,
plot.dotprops
,
potential_synapses
, resample
,
rootpoints
, spine
,
subset.neuron
## prune single neurons# prune neuron 2 down to points that are close to neuron 1 neuron2_close=prune(kcs20[[2]], target=kcs20[[1]], maxdist=10)neuron2_far=prune(kcs20[[2]], target=kcs20[[1]], maxdist=10, keep='far')