vol2spde: Construct a triangular mesh from a 3D volumetric mask

View source: R/vol2spde.R

vol2spdeR Documentation

Construct a triangular mesh from a 3D volumetric mask

Description

Construct a triangular mesh from a 3D volumetric mask

Usage

vol2spde(mask, res, nbhd_order = 1, buffer = c(1, 1, 3, 4, 4))

Arguments

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.

Value

An inla.spde2 object.

INLA Requirement

This function requires the INLA package, which is not a CRAN package. See https://www.r-inla.org/download-install for easy installation instructions.


mandymejia/BayesfMRI documentation built on April 12, 2025, 3:44 p.m.