smooth_neuron: Smooth the 3D coordinates of a neuron skeleton

Description Usage Arguments Value Examples

View source: R/neuron.R

Description

smooth_neuron smooths a neuron.

Usage

1
2
3
smooth_neuron(n, method = c("gauss", "spline"), ...)

smooth_segment_gauss(xyz, sigma, ...)

Arguments

n

Neuron to smooth

method

Smoothing method

...

Additional parameters passed to segment smoothing functions

xyz

A block of 3D coordinates defining an unbranched segment

sigma

The standard deviation of the Gaussian smoothing kernel (which has the same spatial units as the object being smoothed)

Value

A new neuron with smoothed 3d coordinates

Examples

1
2
3
4
5
6
7
8
ns=smooth_neuron(Cell07PNs[[1]], sigma=2)
# plot in 2D zooming in on axon terminals 
plot(Cell07PNs[[1]], col='grey', xlim=c(260,290), ylim=c(115,90))
plot(ns, col='red', add=TRUE)

# 3D plot
plot3d(Cell07PNs[[1]], col='grey')
plot3d(ns, col='red')

nat documentation built on Sept. 6, 2021, 5:09 p.m.