Find neurons with soma inside 3D selection box (usually drawn in rgl window)

find.soma(
  sel3dfun = select3d(),
  indices = names(db),
  db = getOption("nat.default.neuronlist"),
  invert = FALSE,
  rval = c("names", "neuronlist", "data.frame")
)

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').

invert

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

rval

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

Value

Character vector of names of selected neurons

Details

Can work on neuronlists containing neuron objects or neuronlists whose attached data.frame contains soma positions specified in columns called X,Y,Z .