Learn R Programming

BoneDensityMapping (version 0.1.4)

surface_points_template: Redefine surface points. Adds additional surface points (“sliders”) that are spatially distributed across the mesh surface. Adapted from geomorph

Description

Redefine surface points. Adds additional surface points (“sliders”) that are spatially distributed across the mesh surface. Adapted from geomorph

Usage

surface_points_template(surface_mesh, landmarks, no_surface_sliders)

Value

Data frame. 3D coordinates for the combined set of original landmarks and the new surface points

Arguments

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

Author

Scott Telfer scott.telfer@gmail.com

Examples

Run this code
# \donttest{
  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)
# }

Run the code above in your browser using DataLab