View source: R/BoneDensityFunctions.R
landmark_check | R Documentation |
Check landmarks are close to the mesh
landmark_check(surface_mesh, landmarks, threshold = 1)
surface_mesh |
mesh object |
landmarks |
Dataframe. Columns are landmark name, x, y, and z coords |
threshold |
Numeric. Distance landmark can be from surface without warning being thrown |
String. Returns a message warning that landmarks are not on bone surface
Scott Telfer scott.telfer@gmail.com
# Download bone model
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.fcsv",
package = "BoneDensityMapping")
landmarks <- import_lmks(landmark_path)
landmark_check(surface_mesh, landmarks, threshold = 1.0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.