R/centroid_location.R

Defines functions centroid_location

Documented in centroid_location

#' Calculate centroid location
#'
#' @param fname String: Path to stl file
#'
#' @return Numeric vector of centroid location
#' @export
#'
centroid_location <- function(fname) {
  st <- read_stl(fname)
  centroid <- colMeans(st)
  return(centroid)
}
Middleton-Lab/MuscleTernary documentation built on April 26, 2024, 11:29 a.m.