Learn R Programming

morphomap (version 1.5)

morphomapCentroid: morphomapCentroid

Description

Calculate the barycenter of the cortical area

Usage

morphomapCentroid(cp, mp, delta = 0.1)

Value

centroid numeric vector: coordinates of the cortical area

Arguments

cp

matrix: coordinates of the external outline of the section

mp

matrix: coordinates of the internal outline of the section

delta

numeric: picture elements of adjustable side length

Author

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

Examples

Run this code
extsec<-morphomapCircle(10,100)
intsec<-morphomapCircle(8,100)
plot(extsec,asp=1,type="l")
points(intsec,col=2,type="l")
cent<-morphomapCentroid(extsec,intsec,delta = 0.1)  
points(cent[1],cent[2],pch=19,col=3)

Run the code above in your browser using DataLab