Upload Mesh to Google Cloud Storage for BANC Neuroglancer
Source:R/neuroglancer-utils.R
banc_upload_mesh.Rd
This function uploads a mesh.obj file to a Google Cloud Storage bucket that can be accessed by BANC neuroglancer. It uses reticulate to call Python code and manages a conda environment.
The underlying Python code is based on the bikinibottom package: https://github.com/jasper-tms/bikini-bottom/tree/main
Usage
banc_upload_mesh(
mesh,
mesh_id,
vol = "precomputed://gs://lee-lab_brain-and-nerve-cord-fly-connectome/volume_meshes/",
compress = TRUE,
overwrite = FALSE
)
Arguments
- mesh
Character or mesh3d object. Either a path to the .obj file or an R mesh object.
- mesh_id
Integer. ID for the mesh.
- vol
Character. URL for the precomputed volume.
- compress
Logical. Whether to compress the mesh. Default is
TRUE
.- overwrite
Logical. Whether or not to overwrite an extant file of the same name and path at the location specified by
vol
+mesh_id
. Default isFALSE
.
Details
For this function to work the global environment variable GOOGLE_APPLICATION_CREDENTIALS
to
something like "$HOME/.config/gcloud/legacy_credentials/firstname.secondname@gmail.com/adc.json"
.
This file can be obtains by installing gsutil
and running gsutil init
in the terminal.
References
bikinibottom package: https://github.com/jasper-tms/bikini-bottom/tree/main