find.neuron: Find neurons within a 3D selection box (usually drawn in rgl...

Description Usage Arguments Details Value See Also Examples

View source: R/neuronlist_interactive_3d.R

Description

Find neurons within a 3D selection box (usually drawn in rgl window)

Usage

1
2
3
4
5
6
7
8
find.neuron(
  sel3dfun = select3d(),
  indices = names(db),
  db = getOption("nat.default.neuronlist"),
  threshold = 0,
  invert = FALSE,
  rval = c("names", "data.frame", "neuronlist")
)

Arguments

sel3dfun

A select3d style function to indicate if points are within region

indices

Names of neurons to search (defaults to all neurons in list)

db

neuronlist to search. Can also be a character vector naming the neuronlist. Defaults to options('nat.default.neuronlist').

threshold

More than this many points must be present in region

invert

Whether to return neurons outside the selection box (default FALSE)

rval

What to return (character vector, default='names')

Details

Uses subset.neuronlist, so can work on dotprops or neuron lists.

Value

Character vector of names of selected neurons, neuronlist, or data.frame of attached metadata according to the value of rval.

See Also

select3d, find.soma, subset.neuronlist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
plot3d(kcs20)
# draw a 3D selection e.g. around tip of vertical lobe when ready
find.neuron(db=kcs20)
# would return 9 neurons
# make a standalone selection function
vertical_lobe=select3d()
find.neuron(vertical_lobe, db=kcs20)
# use base::Negate function to invert the selection function 
# i.e. choose neurons that do not overlap the selection region
find.neuron(Negate(vertical_lobe), db=kcs20)

## End(Not run)

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