gradient | R Documentation |
This function returns the gradient images for a 3D array or NIfTI volume.
gradient(image, mask = NULL, which = "all", radius = 1)
image |
a 3D array or image of class |
mask |
an array or |
which |
a string specifying the gradient direction that should be returned; either "all" for a list of x, y, and z gradient volumes, or "x", "y", or "z" for a single volume with the given gradient |
radius |
an integer specifying radius of the neighborhood (in voxels) for which the gradient should be calculated |
Either a list of three gradient volumes or a single gradient volume, in either array or NIfTI format based on what was input.
## Not run: library(neurobase) epi <- readnii('path/to/epi') gradients <- gradient(image = epi, which = "all") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.