ciftiTools (version 0.1.6.0)

pad_vol: Pad a 3D Array

Description

Pad a 3D array by a certain amount in each direction, along each dimension. This effectively undoes a crop.

Usage

pad_vol(x, padding, fill = NA)

uncrop_vol(x, padding, fill = NA)

Arguments

x

A 3D array, e.g. unmask_vol(xifti$data$subcort, xifti$meta$subcort$mask).

padding

A dx2 matrix indicating the number of slices to add at the beginning and end of each of the d dimensions, e.g. xifti$meta$subcort$mask_padding.

fill

Values to pad with. Default: NA.

Value

The padded array