Can also choose to select specific neurons along the way and navigate forwards and backwards.

nlscan(
neurons,
db = NULL,
col = "red",
Verbose = T,
Wait = T,
sleep = 0.1,
extrafun = NULL,
selected_file = NULL,
selected_col = "green",
yaml = TRUE,
...,
plotengine = "rgl"
)

## Arguments

neurons a neuronlist object or a character vector of names of neurons to plot from the neuronlist specified by db. A neuronlist to use as the source of objects to plot. If NULL, the default, will use the neuronlist specified by options('nat.default.neuronlist') the color with which to plot the neurons (default 'red'). logical indicating that info about each selected neuron should be printed (default TRUE). logical indicating that there should be a pause between each displayed neuron. time to pause between each displayed neuron when Wait=TRUE. an optional function called when each neuron is plotted, with two arguments: the current neuron name and the current selected neurons. an optional path to a yaml file that already contains a selection. the color in which selected neurons (such as those specified in selected_file) should be plotted. a logical indicating that selections should be saved to disk in (human-readable) yaml rather than (machine-readable) rda format. extra arguments to pass to plot3d. the plotting backend engine to use either 'rgl' or 'plotly'.

## Value

A character vector of names of any selected neurons, of length 0 if none selected.

plot3d.character, plot3d.neuronlist

## Examples

if (FALSE) {
# scan a neuronlist
nlscan(kcs20)

# using neuron names
nlscan(names(kcs20), db=kcs20)
# equivalently using a default neuron list
options(nat.default.neuronlist='kcs20')
nlscan(names(kcs20))
}
# scan without waiting
nlscan(kcs20[1:4], Wait=FALSE, sleep=0)#> Current neuron: FruMARCM-M001205_seg002 ( 1 / 4 )
#> Current neuron: GadMARCM-F000122_seg001 ( 2 / 4 )
#> Current neuron: GadMARCM-F000050_seg001 ( 3 / 4 )
#> Current neuron: GadMARCM-F000142_seg002 ( 4 / 4 )#> NULLif (FALSE) {
# could select e.g. the gamma neurons with unbranched axons
gammas=nlscan(kcs20)
nclear3d()
plot3d(kcs20[gammas])

# plot surface model of brain first
# nb depends on package only available on github
}