View source: R/image-mesh-from-volume.R
mesh_from_volume | R Documentation |
This function is soft-deprecated. Please use
vcg_mesh_volume
, vcg_uniform_remesh
, and
vcg_smooth_explicit
or vcg_smooth_implicit
.
mesh_from_volume(
volume,
output_format = c("rgl", "freesurfer"),
IJK2RAS = NULL,
threshold = 0,
verbose = TRUE,
remesh = TRUE,
remesh_voxel_size = 1,
remesh_multisample = TRUE,
remesh_automerge = TRUE,
smooth = FALSE,
smooth_lambda = 10,
smooth_delta = 20,
smooth_method = "surfPreserveLaplace"
)
volume |
3-dimensional volume array |
output_format |
resulting data format, choices are |
IJK2RAS |
volume 'IJK' (zero-indexed coordinate index) to
|
threshold |
threshold used to create volume mask; the surface will be created to fit the mask boundaries |
verbose |
whether to verbose the progress |
remesh |
whether to re-sample the mesh using |
remesh_voxel_size , remesh_multisample , remesh_automerge |
see
arguments in |
smooth |
whether to smooth the mesh via |
smooth_lambda , smooth_delta , smooth_method |
see |
A 'mesh3d'
surface if output_format
is 'rgl', or
'fs.surface'
surface otherwise.
volume <- array(0, dim = c(8,8,8))
volume[4:5, 4:5, 4:5] <- 1
graphics::image(x = volume[4,,])
# you can use rgl::wire3d(mesh) to visualize the mesh
mesh <- mesh_from_volume(volume, verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.