vol2spde | R Documentation |
Construct a triangular mesh from a 3D volumetric mask
vol2spde(mask, res, nbhd_order = 1, buffer = c(1, 1, 3, 4, 4))
mask |
An array of 0s and 1s representing a volumetric mask |
res |
The spatial resolution in each direction, in mm. For example, c(2,2,2) indicates 2mm isotropic voxels. |
nbhd_order |
For volumetric data, what order neighborhood around data locations to keep? (0 = no neighbors, 1 = 1st-order neighbors, 2 = 1st- and 2nd-order neighbors, etc.). Smaller values will provide greater computational efficiency at the cost of higher variance around the edge of the data. |
buffer |
For volumetric data, size of extra voxels layers around the bounding box, in terms of voxels. Set to NULL for no buffer. |
An inla.spde2 object.
This function requires the INLA
package, which is not a CRAN package.
See https://www.r-inla.org/download-install for easy installation instructions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.