batch_process_meshes: Re-orient and trim meshes, then re-write to new files

Description Usage Arguments Details Value

View source: R/batch_process_meshes.R

Description

This function automates a process that I do repeatedly after collecting 3D scans.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
batch_process_meshes(
  date,
  rtmatrix = NULL,
  downsample = TRUE,
  n_faces = 250000,
  recolor = TRUE,
  write_cols = TRUE,
  save_metrics = TRUE,
  dne_tarface = 10000,
  snapshots = TRUE,
  overwrite = FALSE,
  ...
)

Arguments

date

character string corresponding to date 3D scans were collected

rtmatrix

a 4x4 matrix. Normally supplied by passing a character string corresponding to one of the YYYY-MM-DD dates in the soiltestr::rtmatrices data object. Alternatively, pass a matrix either from the aforementioned data object or a matrix present as a variable in the existing global environment. rtmatrices()

downsample

Whether to reduce the number of faces by calling Rvcg::vcgQEdecim()

n_faces

if downsample = TRUE, number of faces to which mesh should be reduced. Defaults to 250k. Over-ride to a percent by supplying a numeric value with percent = <0-1>, which is passed to Rvcg::vcgQEdecim()

recolor

whether to re-color the meshes based on the average hex color of a digital image taken during testing

write_cols

whether to write a csv file containing the hex color codes for each specimen (into the /derived_data/\<date\> directory)

save_metrics

whether to write a csv file containing morphometrics data derived from this set of meshes

dne_tarface

number of faces to further downsample mesh to compute DNE metric

snapshots

whether to capture screenshots of the meshes (by default, both 16x9 and 4x3 are written)

overwrite

whether to over-write existing files in the target directory (if they have identical names)

...

Other arguments passed to Rvcg::vcgQEdecim()

Details

\lifecycle

experimental

Value

Writes files to disk and prints a message.


evanmascitti/soilmesh documentation built on Sept. 30, 2021, 7:57 a.m.