This function can retrieve some or all the hemibrain project ROI meshes as rgl::mesh3d objects. They are returned in a named neuronlist object. This allows further subsets and colours to be applied via the standard nat::plot3d.neuronlist semantics. See the examples for further details.

hemibrain_roi_meshes(
  rois = NULL,
  microns = FALSE,
  superLevel = NULL,
  OmitFailures = TRUE,
  conn = NULL,
  dataset = NULL,
  ...
)

Arguments

rois

The ROIs to fetch (default NULL implies all ROIs)

microns

convert dimensions from raw voxels into microns (template brain: JRCFIB2018F, else JRCFIB2018Fraw).

superLevel

whether not to show 'superlevel' ROIs - ROIs composed of other ROIs. If set to NULL, both low-level and superlevel ROIs are returned.

OmitFailures

Whether to omit neurons for which FUN gives an error. The default value (NA) will result in nlapply stopping with an error message the moment there is an error. For other values, see details.

conn

optional, a neuprintr connection object, which also specifies the neuPrint server. If NULL, the defaults set in your .Rprofile or .Renviron are used. See neuprint_login for details.

dataset

optional, a dataset you want to query. If NULL, the default specified by your R environ file is used or, failing that the current connection, is used. See neuprint_login for details.

...

Additional arguments passed to nlapply

Value

a neuronlist of rgl::mesh3d objects

See also

Examples

if (FALSE) { # Get all the roi meshes hemibrain.rois = hemibrain_roi_meshes() # Read in these neurons cols = rainbow(length(hemibrain.rois)) for(m in 1:length(hemibrain.rois)){ plot3d(hemibrain.rois[[m]],alpha = 0.5, col = cols[m]) } # Alternatively plot a subset all at once with rainbow colours # making use of nat::plot3d.neuronlist plot3d(hemibrain.rois, 1:3, add=TRUE) # If you have neuprintr >= 1.0 you can easily find groups of meshes # find just the terminal nodes of the MB ROI hierarchy library(nat) mbterms=nat::endpoints(neuprint_ROI_hierarchy(root='MB(R)', rval='graph')) mb.rois=hemibrain_roi_meshes(mbterms) plot3d(mb.rois, add=TRUE) }