View source: R/BoneDensityFunctions.R
surface_points_template | R Documentation |
Redefine surface points. Adds additional surface points (“sliders”) that are spatially distributed across the mesh surface. Adapted from geomorph
surface_points_template(surface_mesh, landmarks, no_surface_sliders)
surface_mesh |
Mesh object |
landmarks |
Data frame with landmark coordinates (columns: ID, x, y, z) |
no_surface_sliders |
Numeric. No. of surface points to generate |
Data frame. 3D coordinates for the combined set of original landmarks and the new surface points
Scott Telfer scott.telfer@gmail.com
url <- "https://github.com/Telfer/BoneDensityMapping/releases/download/v1.0.2/test_CT_femur.stl"
bone_filepath <- tempfile(fileext = ".stl")
download.file(url, bone_filepath, mode = "wb")
surface_mesh <- import_mesh(bone_filepath)
landmark_path <- system.file("extdata", "test_femur.mrk.json",
package = "BoneDensityMapping")
landmarks <- import_lmks(landmark_path)
mapped_coords <- surface_points_template(surface_mesh, landmarks, 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.