applyDisplacementField: apply a discrete displacement field to a set of points/mesh...

View source: R/displacementField.r

applyDisplacementFieldR Documentation

apply a discrete displacement field to a set of points/mesh in its domain

Description

apply a discrete displacement field to a set of points/mesh in its domain by applying the gaussian smoothed interpolation based of k closest neighbours

Usage

applyDisplacementField(
  dispfield,
  points,
  k = 10,
  sigma = 20,
  type = c("Gauss", "Laplace", "Exponential", "TPS"),
  gamma = 1,
  lambda = 1e-08,
  threads = 1
)

Arguments

dispfield

displacement field of class "DisplacementField", e.g. created using createDisplacementField or

points

matrix or mesh3d at which to evaluate the interpolated displacement field

k

integer: number of k closest points to evaluate.

sigma

kernel bandwidth used for smoothing. For all kernels except B-spline, sigma controls the importance of the neighbourhood by defining the bandwidth of the smoothing kernel. For B-spline it defines the support (the higher, the "wobblier" the deformation field can become.

type

kernel function for smoothing are "Gauss","Laplace", "Exponential" and "Bspline" (or any abbreviation thereof).

gamma

dampening factor (displacement vectors will be divided by gamma

lambda

smoothing factor for TP

threads

integer: number of threads to use for computing the interpolation.

Value

returns the displaced version of points

Note

if points is identical to the domain of the displacement field, no interpolation will be performed.


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