if(interactive()){
#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,param1 = 0.5,
radius.fact = 2.5,npovs = 100,clean_int_out = TRUE,
num.points = 500, start = 0.2,end=0.8)
shapeSections<-morphomapShape(rawSections,24,sects_vector=NULL,cent.out="CCA",
delta=0.1, side="left")
#built 3D morphometric map
bone3Dmap<-morphomap3Dmap(shapeSections, out.sur=perMesh,
plot = TRUE,rem.out=TRUE,
fac.out=1.5,smooth=TRUE,
smooth.iter=5)
#or
require(rgl)
rgl::open3d()
rgl::shade3d(perMesh,col=bone3Dmap$cols,specular="black")
#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 3D morphometric map
bone3Dmap<-morphomap3Dmap(shapeSections, out.sur=perMesh,
plot = TRUE,rem.out=TRUE,
fac.out=1.5,smooth=TRUE,
smooth.iter=5)
#or
require(rgl)
rgl::open3d()
rgl::shade3d(perMesh,col=bone3Dmap$cols,specular="black")
}
Run the code above in your browser using DataLab