View source: R/hemibrain_split.R
hemibrain_use_splitpoints | R Documentation |
Split a neuron using a data.frame
of stored split points.
hemibrain_use_splitpoints(x, df, knn = FALSE, ...)
x |
a |
df |
a |
knn |
logical, whether or not to find corresponding points
between |
... |
Additional arguments passed to methods or eventually to
|
a neuronlist
flow_centrality
hemibrain_splitpoints
, flow_centrality
, hemibrain_precomputed_splitpoints
# Choose neurons
## These neurons are some 'tough' examples from the hemibrain:v1.0.1
### They will split differently depending on the parameters you use.
tough = c("5813056323", "579912201", "5813015982", "973765182", "885788485",
"915451074", "5813032740", "1006854683", "5813013913", "5813020138",
"853726809", "916828438", "5813078494", "420956527", "486116439",
"573329873", "5813010494", "5813040095", "514396940", "665747387",
"793702856", "451644891", "482002701", "391631218", "390948259",
"390948580", "452677169", "511262901", "422311625", "451987038"
)
# for documentation purposes only run first 5 examples
tough=tough[1:5]
# Get neurons
neurons = neuprintr::neuprint_read_neurons(tough)
# Now make sure the neurons have a soma marked
## Some hemibrain neurons do not, as the soma was chopped off
neurons.checked = hemibrain_skeleton_check(neurons, meshes = hemibrain.surf)
# Split neuron
## These are the recommended parameters for hemibrain neurons
neurons.flow = flow_centrality(neurons.checked, polypre = TRUE,
mode = "centrifugal",
split = "distance")
# Save the results
splitpoints = hemibrain_splitpoints(neurons.flow)
# Re-use the results
neurons.flow.2 = hemibrain_use_splitpoints(neurons, splitpoints, knn = FALSE)
## Not run:
# Plot the split to check it
nat::nopen3d()
nlscan_split(neurons.flow2, WithConnectors = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.