R/neuronvolume.R
fafb_segs_stitch_volumes.Rd
Stitch together volumes for a single neuron, based on the Google FAFB segmentation by Peter Li. If the neuron given has its microtubules marked (catnat::mark.microtubules), Strahler orders (catnat::assign_strahler) or axon/dendrite (catnat::flow.centrality) then this information can be used to estimate a volume that over these neuronal sub-compartments.
Visualise neuron meshes or point clouds, retrieved and downsampled from the Google brainmaps segmentation by Peter Li.
fafb_segs_stitch_volumes(neuron, volumes = NULL, map = TRUE, voxelSize = 50, downsample.factor = 12, soma = TRUE, node.match = 4, smooth = FALSE, resample.neuron = TRUE, resample.volume = FALSE, smooth.type = c("taubin", "laplace", "HClaplace", "fujiLaplace", "angWeight", "surfPreserveLaplace"), lambda = 0.5, mu = -0.53, delta = 0.1, conn = NULL, ...) neuronvolume3d(neuronvolume, type = c("volume", "points"), split = c("whole", "split", "soma", "primary neurite", "axon", "dendrite", "microtubule", "primary dendrite"), alpha = 0.3, WithConnectors = TRUE, synapse.radius = 500, cols = c(neuron = "grey", dendrite = "cyan", soma = "magenta", primary.neurite = "purple", primary.dendrite = "chartreuse", axon = "orange", microtubule = "green", twig = "brown"))
neuron | a neuron object that matches the volumes given |
---|---|
volumes | a list of mesh3d objects, retrieved using fafbseg::read_brainmaps_meshes |
map | if TRUE, instead of using the volumes argument, map_fafbsegs_to_neuron and fafbseg::read_brainmaps_meshes are used to retrieve Google 3D segmentations as mesh3d objects |
voxelSize | a single number, which is used to downsample the starting meshes, resample neuron, and choose an alpha value for alphashape3d::ashape3d() |
downsample.factor | after the Google volumes have been resampled uniformly at voxelSize, points are randomly removed from the neuron cloud (no.points=no.points/downsample.factor) in order to make alphashape generation by alphashape3d::ashape manageable |
soma | if TRUE, the soma (root point for neuron) will be identified |
node.match | how many nodes of each neuron in someneuronlist, need to be within a auto segmented volume, for it to be said to match. These nodes all need to be consecutive, in the sense that they must be in the same segment or a branch from that segment. I.e. If a neuron matches with a volume 5 times at diverse points across it arbour, this is thought to be a non-match with a large, proximal auto-traced segment. need be in the volumetric Google FAFB segmentation for a Neuroglancer fragment, for that fragment to be returned |
smooth | if TRUE, the final mesh will be smoothed, using |
resample.neuron | if TRUE, neuron is resampled (nat:resample), stepsize = voxelSize |
resample.volume | if TRUE, the final mesh3D object is uniformly resampled using Rvcg::vcgUniformRemesh, voxelSize = voxelSize |
smooth.type | character: select smoothing algorithm. Available are "taubin", "laplace", "HClaplace","fujiLaplace", "angWeight" (and any sensible abbreviations). See Rvcg::vcgSmooth |
lambda | numeric: parameter for Taubin smooth. See Rvcg::vcgSmooth |
mu | numeric:parameter for Taubin smooth. See Rvcg::vcgSmooth |
delta | numeric: parameter for Scale dependent laplacian smoothing and maximum allowed angle (in radians) for deviation between normals Laplacian (surface preserving). See Rvcg::vcgSmooth |
conn | CATMAID connection |
... | methods passed to Rvcg functions: vcgUniformRemesh, vcgSmooth, vcgClost |
neuronvolume | an object of class neuronvolume, as returned by catnat::fafb_segs_stitch_volumes |
type | whether to plot meshes of a point cloud |
split | whether to plot the whole neuron or some subset of it |
alpha | mesh transparency |
WithConnectors | whether or not to plot synaptic connectors using spheres3D() |
synapse.radius | radius information passed to rgl:spheres3d |
cols | colours for different parts of the neuron |
a 'neuronvolume' object, with the same structure as a neuron object (see the nat package), but which contains a mesh3D object for the neuron and other volume related data as a list at neuron$volume