subsampleDeform: Deforms a reference to a target based on a TPS or...

View source: R/posteriorDeform.r

subsampleDeformR Documentation

Deforms a reference to a target based on a TPS or AmbergDeform

Description

Deforms a (pre-aligned) reference to a target based on a TPS/AmbergDeform and automatically sampled sliding semi-landmarks

Usage

subsampleDeform(
  reference,
  target,
  partsample = NULL,
  samplenum = 1000,
  distance = 1e+10,
  slide = 3,
  bending = TRUE,
  ray = FALSE,
  Amberg = FALSE,
  rhotol = pi/2,
  reflm = NULL,
  tarlm = NULL,
  forceLM = FALSE,
  silent = FALSE,
  threads = 1,
  ...
)

Arguments

reference

reference mesh

target

target mesh

partsample

predetermined sample points on the reference mesh

samplenum

integer: if partsample=NULL, this specifies the number of coordinates sampled on the model mean

distance

numeric: constrain maximum distance to mark target point as appropriate

slide

integer: if > 0 the valid correspondences on the model instance will be relaxed minimizing bending energy/procrustes distance.

bending

logical: if TRUE, the coordinates on the model instance are relaxed using bending energy, Procrustes distance otherwise

ray

logical: if TRUE, the closest point search will be performed along the normals only

Amberg

if TRUE the deformation will use the function AmbergDeformSpam and tps3d otherwise

rhotol

maximal tolerated angle between normals to be considered a valid match

reflm

matrix containing 3D landmarks on the reference

tarlm

matrix containing 3D landmarks on the target surface

forceLM

if TRUE, predfined landmarks modlm are not allowed to slide. For cases with high uncertainty, this can lead to unwanted mesh distortions.

silent

logical: supress debug output

threads

integer: number of threads to use for tps interpolation (set to 1 if using openblas, or otherwise it can become instable)

...

additional parameters passed to AmbergDeformSpam.

Value

returns a deformed version of a model instance fitted to the target

Note

Please note that it is required to align the target mesh to the reference mesh beforehand. This can be performed using the function icp, for example.


zarquon42b/mesheR documentation built on Jan. 28, 2024, 2:17 p.m.