orient_sample: Orient a 3D mesh in real-world coordinates

Description Usage Arguments Details Value Examples

View source: R/orient_sample.R

Description

The EinScan SP records points in a coordinate system where the camera eye is (0,0,0). This is the first step in the pipeline, prior to other cleaning operations (these are threefold: removing the sample holder; adjusting the x and y coordinates so the specimen is precisely centered; moving the mesh up or down so its original/undisturbed surface lies in the x-y plane)

Usage

1
orient_sample(mesh, rot_tr_matr)

Arguments

mesh

a "mesh3d" object

rot_tr_matr

a 4x4 matrix

Details

orient_sample() takes a "mesh3d" object and a 4x4 matrix as inputs and passes them to Morpho::applyTransform. The matrix can be specified three ways, in order of increasing preference:

  1. Saved as an .rda file so can be accessed any time soilmesh is loaded

  2. Converted from a .csv or other flat file, then converted to a matrix with as.matrix() 3. Manually inputted with matrix()

Every time the scanner is moved or re-calibrated, a new matrix must be computed. This function is designed to make that process less of a pain and to ensure the entire pipeline is not broken irreversibly by accidentally bumping the scanner.

Value

the rotated and translated "mesh3d" object

Examples

1

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