View source: R/BoneDensityFunctions.R
surface_points_new | R Documentation |
New mapped surface points from template
surface_points_new(
surface_mesh,
landmarks,
template,
mirror = FALSE,
plot_check = FALSE
)
surface_mesh |
List. Mesh data imported via ply_import function |
landmarks |
Data frame. Contains 3D coords of landmarks |
template |
Data frame. 3D coords of remapped surface points |
mirror |
Logical or character. Set to "x", "y", or "z" to mirror the mesh and landmarks across that axis before remapping. |
plot_check |
Logical. If TRUE, generates a 3D plot showing the mirrored mesh, mirrored landmarks, remapped surface points, and original template points to visually verify correct orientation and laterality. |
Data frame. 3D coords of remapped surface points
Scott Telfer scott.telfer@gmail.com Adapted from geomorph
url <- "https://github.com/Telfer/BoneDensityMapping/releases/download/v1.0.2/SCAP001.stl"
bone_filepath <- tempfile(fileext = ".stl")
download.file(url, bone_filepath, mode = "wb")
scap_001_mesh <- import_mesh(bone_filepath)
landmark_path <- system.file("extdata", "SCAP001_landmarks.fcsv",
package = "BoneDensityMapping")
scap_001_lmk <- import_lmks(landmark_path)
template_coords <- surface_points_template(scap_001_mesh, scap_001_lmk,
1000)
url2 <- "https://github.com/Telfer/BoneDensityMapping/releases/download/v1.0.2/SCAP002.stl"
bone_filepath <- tempfile(fileext = ".stl")
download.file(url2, bone_filepath, mode = "wb")
scap_002_mesh <- import_mesh(bone_filepath)
landmark_path <- system.file("extdata", "SCAP002_landmarks.fcsv",
package = "BoneDensityMapping")
scap_002_lmk <- import_lmks(landmark_path)
scap_002_remapped <- surface_points_new(scap_002_mesh, scap_002_lmk,
template_coords, mirror = "x",
plot_check = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.