View source: R/write_surfaces.R
write_surfaces | R Documentation |
Writes multiple meshes as PLY, STL, OBJ or VTK files
write_surfaces(surfaces = surfaces, pattern = c("PLY", "STL", "VTK", "OBJ"), binary = FALSE, print.progress = TRUE)
surfaces |
an object of the class "mesh_array" that contains two lists: a table with the meshes information (name, number of faces and vertices) and all the meshes that had previously been imported using the function import_surfaces. |
pattern |
Parameter indicating which format the meshes should be saved as. Options are _"PLY"_, _"STL"_, _"VTK"_ or _"OBJ"_. |
binary |
optional logical parameter indicating whether to write binary files (only for _"PLY"_ or _"STL"_). For more information check *?vcgStlWrite* and *?vcgPlyWrite* in Rvcg. |
print.progress |
optional parameter indicating whether to print the progress |
Takes an object of the class "mesh_array", which has been processed with the read_surfaces function, and saves the meshes as PLY, STL, or VTK meshes. The name of the meshes is (mesh_ID)_post.(mesht_type), for example, *mesh1_post.vtk*.
Marta Vidal-Garcia
Schlager S (2017). “Morpho and Rvcg - Shape Analysis in R.” In Zheng G, Li S, Szekely G (eds.), _Statistical Shape and Deformation Analysis_, 217-256. Academic Press. ISBN 9780128104934.
data(meshes) # Example 1 - save VTK files write_surfaces(surfaces = meshes, pattern = "VTK", print.progress = TRUE) #' # Example 2 - save binary PLY files, don't print progress write_surfaces(surfaces = meshes, pattern = "PLY", binary = TRUE, print.progress = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.