View source: R/BoneDensityFunctions.R
bone_scan_check | R Documentation |
Check if surface model is fully contained within scan volume
bone_scan_check(surface_mesh, nifti, return_limits = FALSE)
surface_mesh |
mesh object (class |
nifti |
NIfTI image object representing CT scan. |
return_limits |
Logical. If TRUE returns a summary of the bounding boxes of the scan and mesh |
If any vertices lie outside the scan volume, it raises an error.
Scott Telfer scott.telfer@gmail.com
# Download CT scan
url <- "https://github.com/Telfer/BoneDensityMapping/releases/download/v1.0.2/test_CT_hip.nii.gz"
scan_filepath <- tempfile(fileext = ".nii.gz")
download.file(url, scan_filepath, mode = "wb")
nifti <- import_scan(scan_filepath)
url2 <- "https://github.com/Telfer/BoneDensityMapping/releases/download/v1.0.2/test_CT_femur.stl"
bone_filepath <- tempfile(fileext = ".stl")
download.file(url2, bone_filepath, mode = "wb")
surface_mesh <- import_mesh(bone_filepath)
bone_scan_check(surface_mesh, nifti, return_limits = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.