Description Usage Arguments Details Value See Also Examples
Reads landmark coordinates stored in a TPS file as generated by save.tps
.
Note: this is not a generic function to read TPS file, it's only designed for TPS file
storing 3D landmark data. For more generic function, see e.g.:
readland.tps
, import_tps
or
readallTPS
.
1 2 |
file.name |
A character value containing the TPS file name (with extension). |
sdir |
A character value indicating the path to the saving directory. |
LMheader |
A character value specifying the keyword to use in the TPS file to indicate the number of
landmarks. |
IDheader |
A character value specifying the keyword to use in the TPS file to indicate the individual
identifier. |
SCheader |
A character value specifying the keyword to use in the TPS file to indicate the scale
identifier. |
k |
A numercial value (positive integer) indicating the dimensions of data. |
quiet |
A logical value indicating if a line should be printed when the tps file is opened (see
|
Given a TPS filename (file.name
) contained in the sdir
directory, this functions extracts 3D
landmark coordinates (possibly scales them), and stores them into an array (landmarks by lines,
dimensions=3 by columns, and individual by slices).
A p*k*n numerical array (p: nb of landmarks, k: nb of dimensions, n: number of individuals).
1 2 3 4 5 6 7 8 9 | # Generates first two 10*3 random matrices, just for illustration purpose,
# but such as it could be obtained after two mesh digitizations:
M <- matrix(rnorm(30), 10, 3)
N <- matrix(rnorm(30), 10, 3)
# Then, saves them as a TPS file:
save.tps(M, ID = "randomMatrix_M", file.name = "TPSfile4randomMatrix.tps")
save.tps(N, ID = "randomMatrix_N", file.name = "TPSfile4randomMatrix.tps", app=TRUE)
# And finally, read it:
A <- read.tps("TPSfile4randomMatrix.tps")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.