R/hemibrain_meshes.R
hemibrain_roi_meshes.RdThis 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, ... )
| rois | The ROIs to fetch (default |
|---|---|
| microns | convert dimensions from raw voxels into microns (template brain: |
| 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 |
| conn | optional, a neuprintr connection object, which also specifies the
neuPrint server. If NULL, the defaults set in your
|
| dataset | optional, a dataset you want to query. If |
| ... | Additional arguments passed to |
a neuronlist of rgl::mesh3d objects
hemibrain_skeleton_check, hemibrain.surf,
neuprintr::neuprint_ROI_mesh,
neuprintr::neuprint_ROI_hierarchy
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) }