align2domain: align a sample to a model

Description Usage Arguments Value Examples

Description

align a sample to a model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
align2domain(model, sample, type = c("rigid", "similarity", "affine"),
  ptDomain = NULL, ptSample = NULL)

## S4 method for signature 'pPCA,matrix'
align2domain(model, sample, type = c("rigid",
  "similarity", "affine"), ptDomain = NULL, ptSample = NULL)

## S4 method for signature 'pPCA,mesh3d'
align2domain(model, sample, type = c("rigid",
  "similarity", "affine"), ptDomain = NULL, ptSample = NULL)

Arguments

model

statistical model of class "pPCA"

sample

matrix or mesh3d

type

type of transform

ptDomain

integer vector: specifies the indices of the domain points that are to be used for registration (order is important).

ptSample

integer vector: specifies the indices of the sample that are to be used for registration (order is important).

Value

a rotated (and scaled) mesh or matrix - depending on the input.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(Morpho)
data(boneData)
mymod <- pPCA(boneLM,align=TRUE)
## rigidly align first specimen to model
align1 <- align2domain(mymod,boneLM[,,1])
## now align by an affine transform
alignAffine <- align2domain(mymod,boneLM[,,1],type="affine")
## Not run: 
deformGrid3d(align1,DrawMean(mymod))
deformGrid3d(alignAffine,DrawMean(mymod))

## End(Not run)

zarquon42b/RvtkStatismo documentation built on May 4, 2019, 9:09 p.m.