prune_in_volume: Prune neuron(s) within a volume defined by a 3D mesh

View source: R/ngraph.R

prune_in_volumeR Documentation

Prune neuron(s) within a volume defined by a 3D mesh

Description

Prune neuron(s) within a volume defined by a 3D mesh

Usage

prune_in_volume(x, surf, neuropil = NULL, invert = TRUE, ...)

## S3 method for class 'neuron'
prune_in_volume(x, surf, neuropil = NULL, invert = TRUE, ...)

## S3 method for class 'neuronlist'
prune_in_volume(x, surf, neuropil = NULL, invert = TRUE, ...)

Arguments

x

a neuron object

surf

An hxsurf or mesh3d object, or any object coercible into mesh3d by as.mesh3d.

neuropil

Character vector specifying a subset of the surf object. This is only relevant when surf is of class hxsurf. If NULL (default), then the full object given as surf will be used for the pruning.

invert

Logical when TRUE indicates that points inside the mesh are kept.

...

Additional arguments for methods (eventually passed to prune_vertices) surface should be pruned.

Details

Prune a neuron to be within, or to exclude arbour within, a 3D object that can be coerced into the mesh3d data structure

Value

A pruned neuron/neuronlist object

See Also

as.neuron.ngraph, subset.neuron, prune.neuron, prune

Examples

## Not run: 
### Example requires the package nat.flybrains
LH_arbour = prune_in_volume(x = Cell07PNs, surf = nat.flybrains::IS2NP.surf,
  neuropil = "LH_L", OmitFailures = TRUE)

## End(Not run)

jefferis/nat documentation built on Feb. 22, 2024, 12:45 p.m.