createBayes: create an object of class BayesDeform to be used in...

View source: R/createBayes.r

createBayesR Documentation

create an object of class BayesDeform to be used in gaussMatch and AmbergRegister

Description

create an object of class BayesDeform to be used in gaussMatch and AmbergRegister

Usage

createBayes(
  model,
  sdmax = numeric(0),
  mahalanobis = "chisq",
  ptValueNoise = 2,
  wt = NULL,
  align = TRUE,
  shrinkfun = NULL,
  initparams = NULL
)

Arguments

model

a model of class pPCA created with package RvtkStatismo

sdmax

numeric or vector of numerics (length must be of value =< iterations as to be specified in gaussMatch or AmbergRegister. If length(sd) =n < iterations, then the first n iterations will be restricted to the according standard deviations

mahalanobis

parameter according to mahaprob in function RvtkStatismo::PredictSample from RvtkStatismo

ptValueNoise

parameter according to ptValueNoise in function RvtkStatismo::statismoConstrainModel from RvtkStatismo

wt

numeric: a weight put on the closest model configuration. E.g. if wt = 2 the deformation will be 0.33*closestPoints + 0.66*most probable model shape. This can either be a constant scalar (that might be modified in each iteration by a shrinkage function - see below) or a vector of length sdmax.

align

logical: if the target mesh is already aligned to the model, align can be set to FALSE.

shrinkfun

a two-valued function for the generation of the weight in the i-th iteration. See examples below.

initparams

initial estimation of the model parameters

Value

returns a list of class "BayesDeform"

Examples

## Not run: 
shrinkfun <- function(x,i){x <- x*0.9^i; return(x)}
# for wt=0.5 this will produce 
# 

## End(Not run)

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