deformGrid3d | R Documentation |

visualise differences between two superimposed sets of 3D landmarks by deforming a cubic grid based on a thin-plate spline interpolation

deformGrid3d( matrix, tarmatrix, ngrid = 0, align = FALSE, lwd = 1, showaxis = c(1, 2), show = c(1, 2), lines = TRUE, lcol = 1, add = FALSE, col1 = 2, col2 = 3, type = c("s", "p"), size = NULL, pcaxis = FALSE, ask = TRUE, margin = 0.2, createMesh = FALSE, slice1 = NULL, slice2 = NULL, slice3 = NULL, gridcol = 1, gridwidth = 1, ... )

`matrix` |
reference matrix containing 3D landmark coordinates or mesh of class "mesh3d" |

`tarmatrix` |
target matrix containing 3D landmark coordinates or mesh of class "mesh3d" |

`ngrid` |
number of grid lines to be plotted; ngrid=0 suppresses grid creation. |

`align` |
logical: if TRUE, |

`lwd` |
width of lines connecting landmarks. |

`showaxis` |
integer (vector): which dimensions of the grid to be plotted. Options are combinations of 1,2 and 3. |

`show` |
integer (vector): if c(1:2) both configs will be plotted, show = 1 only plots the reference and show = 2 the target |

`lines` |
logical: if TRUE, lines between landmarks will be plotted. |

`lcol` |
color of lines |

`add` |
logical: add to existing rgl window. |

`col1` |
color of "matrix" |

`col2` |
color of "tarmat" |

`type` |
"s" renders landmarks as spheres; "p" as points - much faster for very large pointclouds. |

`size` |
control size/radius of points/spheres |

`pcaxis` |
logical: align grid by shape's principal axes. |

`ask` |
logical: if TRUE for > 1000 coordinates the user will be asked to prefer points over spheres. |

`margin` |
margin around the bounding box to draw the grid |

`createMesh` |
logical: if TRUE, a triangular mesh of spheres and displacement vectors (can take some time depending on number of reference points and grid density). |

`slice1` |
integer or vector of integers: select slice(s) for the dimensions |

`slice2` |
integer or vector of integers: select slice(s) for the dimensions |

`slice3` |
integer or vector of integers: select slice(s) for the dimensions |

`gridcol` |
define color of grid |

`gridwidth` |
integer: define linewidth of grid |

`...` |
additional parameters passed to |

if `createMesh=TRUE`

, a mesh containing spheres of reference and target as well as the displacement vectors is returned. Otherwise the knots of the displaced grid is returned.

Stefan Schlager

`tps3d`

if (interactive()){ data(nose) deformGrid3d(shortnose.lm,longnose.lm,ngrid=10) ## select some slices deformGrid3d(shortnose.lm,longnose.lm,showaxis=1:3,ngrid=10,slice1=2,slice2=5,slice3=7) }

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.