Skip to contents

Read one or more BANC neuron and nuclei meshes

Usage

banc_read_neuron_meshes(ids, savedir = NULL, format = c("obj", "ply"), ...)

banc_read_mitochondria_mesh(
  ids,
  lod = 0L,
  savedir = NULL,
  method = c("vf", "ply"),
  ...
)

banc_read_nuclei_mesh(
  ids,
  lod = 0L,
  savedir = NULL,
  method = c("vf", "ply"),
  ...
)

Arguments

ids

One or more root ids

savedir

An optional location to save downloaded meshes. This acts as a simple but effective cache since flywire neurons change id whenever they are edited.

format

Mesh on-the-wire format. "obj" (default) needs no extra dependency. "ply" is more compact but requires the Rvcg package; passing format = "ply" without Rvcg installed previously caused a silent empty return — an explicit error is now raised in that case.

...

Additional arguments passed to read_cloudvolume_meshes

lod

The level of detail (highest resolution is 0, default of 2 gives a good overall morphology while 3 is also useful and smaller still).

method

How to treat the mesh object returned from neuroglancer, i.e. as a mesh3d object or a ply mesh.

Value

A neuronlist containing one or more mesh3d objects. See read.neurons for details.

Examples

if (FALSE) { # \dontrun{
neuron.mesh <- banc_read_neuron_meshes("720575941478275714")
plot3d(neuron.mesh, alpha = 0.1)
nucleus.mesh <- banc_read_nuclei_mesh("72903876004544795")
plot3d(nucleus.mesh, col = "black")
} # }