if (interactive()){
library(colorRamps)
#morphomap on a human femur bone
data(HomFem38023)
meshes<-morphomapSegm(HomFem38023, param1=4)
perMesh<-meshes$external
endMesh<-meshes$internal
mech_length<-380.23
rawSections<-morphomapCore(out.sur=perMesh,
inn.sur=endMesh,num.sect=61,mech.len = mech_length, start = 0.2,end=0.8)
shapeSections<-morphomapShape(rawSections,24,sects_vector=NULL,cent.out="CCA",
delta=0.1, side="left")
#built 2D morphometric map without GAM smoothing
bone2Dmap<-morphomap2Dmap(morphomap.shape=shapeSections,
plot = TRUE, rem.out = TRUE,fac.out = 1.0, pal = blue2green2red(101),
aspect=2)
#built 2D morphometric map with GAM smoothing
bone2Dmap<-morphomap2Dmap(morphomap.shape=shapeSections,gam=TRUE,
plot = TRUE, rem.out = TRUE,fac.out = 1.0, pal = blue2green2red(101),
aspect=2)
#morphomap on a chimpanzee femur bone
data(PanFem27713)
meshes<-morphomapSegm(PanFem27713, param1=3)
perMesh<-meshes$external
endMesh<-meshes$internal
mech_length<-277.13
rawSections<-morphomapCore(out.sur=perMesh,
inn.sur=endMesh,num.sect=61,mech.len = mech_length, start = 0.2,end=0.8)
shapeSections<-morphomapShape(rawSections,24,sects_vector=NULL,cent.out="CCA",
delta=0.1, side="left")
#built 2D morphometric map without GAM smoothing
bone2Dmap<-morphomap2Dmap(morphomap.shape=shapeSections,plot = TRUE,
rem.out = TRUE,fac.out = 1.0,pal = blue2green2red(101),aspect=2)
#built 2D morphometric map with GAM smoothing
bone2Dmap<-morphomap2Dmap(morphomap.shape=shapeSections,gam=TRUE,
plot = TRUE, rem.out = TRUE,fac.out = 1.0,pal = blue2green2red(101),
aspect=2)
}
Run the code above in your browser using DataLab