read_rgl_mesh_zip: Read a mesh object from a zip file generated by...

Description Usage Arguments Details Value Examples

View source: R/mouse_ccf_meshes.R

Description

This is currently only intended to work with triangular faces.

Usage

1
read_rgl_mesh_zip(mesh_name, zip_file, material = "gray")

Arguments

mesh_name

A character object specifying the mesh name, which will be used for file names.

zip_file

The zip file containing vectorized meshes.

material

The rgl material to use for the mesh. Default is "gray". For details, see ?rgl.material.

Details

This reverses the proccessing in save_rgl_mesh_zip() to rebuild the mesh object from binary vectors.

If you're looking for a simple way to get a brain structure, use ccf_2017_mesh, which wraps this function, and retrieves a mesh that's included in this package.

Value

a list object with class mesh3d and shape3d.

Examples

1
2
3
4
mesh_store <- system.file("extdata", "ccf_2017_meshes.zip", package = "cocoframer")
structure_id <- mba_structure_id(acronym = "MOp")
MOp_mesh <- read_rgl_mesh(structure_id,
                          zip_file = mesh_store)

AllenInstitute/cocoframer documentation built on May 21, 2020, 3:09 a.m.