Visually browse through a sample rendering its landmarks and corresponding surfaces.
Browse through a sample rendering its landmarks and corresponding surfaces. This is handy e.g. to check if the landmark projection using placePatch was successful, and to mark specific specimen.
checkLM(dat.array, path = NULL, prefix = "", suffix = ".ply", col = "white", pt.size = NULL, alpha = 1, begin = 1, render = c("w", "s"), point = c("s", "p"), add = FALSE, meshlist = NULL, Rdata = FALSE, atlas = NULL, text.lm = FALSE)
dat.array |
array or list containing landmark coordinates. |
path |
optional character: path to files where surface meshes are stored locally. If not specified only landmarks are displayed. |
prefix |
prefix to attach to the filenames extracted from
|
suffix |
suffix to attach to the filenames extracted from
|
col |
mesh color |
pt.size |
size of plotted points/spheres. If |
alpha |
value between 0 and 1. Sets transparency of mesh 1=opaque 0= fully transparent. |
begin |
integer: select a specimen to start with. |
render |
if render="w", a wireframe will be drawn, else the meshes will be shaded. |
point |
how to render landmarks. "s"=spheres, "p"=points. |
add |
logical: add to existing rgl window. |
meshlist |
list holding meshes in the same order as |
Rdata |
logical: if the meshes are previously stored as Rdata-files by
calling save(), these are simply loaded and rendered. Otherwise it is
assumed that the meshes are stored in standard file formats such as PLY, STL
or OBJ, that are then imported with the function |
atlas |
provide object generated by |
text.lm |
logical: number landmarks. Only applicable when
|
returns an invisible vector of indices of marked specimen.
if Rdata=FALSE
, the additional command line tools need to be
installed
(http://sourceforge.net/projects/morpho-rpackage/files/Auxiliaries/)
data(nose) ###create mesh for longnose longnose.mesh <- tps3d(shortnose.mesh,shortnose.lm,longnose.lm,threads=1) ### write meshes to disk save(shortnose.mesh, file="shortnose") save(longnose.mesh, file="longnose") ## create landmark array data <- bindArr(shortnose.lm, longnose.lm, along=3) dimnames(data)[[3]] <- c("shortnose", "longnose") ## Not run: checkLM(data, path="./",Rdata=TRUE, suffix="") ## End(Not run) ## now visualize by using an atlas: atlas <- createAtlas(shortnose.mesh, landmarks = shortnose.lm[c(1:5,20:21),], patch=shortnose.lm[-c(1:5,20:21),]) ## Not run: checkLM(data, path="./",Rdata=TRUE, suffix="", atlas=atlas) ## End(Not run) ## remove data from disk unlink("shortnose") unlink("longnose")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.