morphomapFlip: morphomapFlip

Description Usage Arguments Value Author(s) Examples

View source: R/morphomapFlip.R

Description

Spherical flipping operator for bi-dimensional configuration

Usage

1
morphomapFlip(mat, param1 = 0.8, param2 = 10, radius.fact = 1.5, npovs = 100)

Arguments

mat

numeric matrix: coordinates of the bi-dimensional configuration

param1

numeric: first parameter for spherical flipping

param2

numeric: second parameter for spherical flipping

radius.fact

mechanical length of the long bone

npovs

number of evenly spaced points to be defined on each section

Value

mat matrix after spherical flipping

Author(s)

Antonio Profico, Luca Bondioli, Pasquale Raia, Paul O'Higgins, Damiano Marchi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#create a section
extsec<-morphomapCircle(10,1000)
intsec<-morphomapCircle(8,1000)
#simulate noise 
noiseX<-rnorm(1000,mean = 0,sd = 0.2)
noiseY<-rnorm(1000,mean = 0,sd = 0.2)
noise<-cbind(noiseX,noiseY)
noisect<-intsec+noise
#spherical flipping
flipsect<-morphomapFlip(noisect,param1 = 2,radius.fact = 2)
sortsect<-morphomapSort(flipsect)
#original section
plot(extsec,asp=1,type="l",xlim=c(-15,15),ylim=c(-15,15))
points(intsec,asp=1,type="l",xlim=c(-15,15),ylim=c(-15,15))
#noise
points(noisect,col=2)
#new section after spherical flipping
points(sortsect,type="l",col=3,asp=1,lwd=2)

morphomap documentation built on Jan. 13, 2021, 6:27 a.m.