Learn R Programming

neuroim (version 0.0.6)

matrixToVolumeList: matrixToVolumeList converts a matrix to a list of BrainVolumes with values filled at grid coordinates determined by the vox argument.

Description

matrixToVolumeList converts a matrix to a list of BrainVolumes with values filled at grid coordinates determined by the vox argument.

Usage

matrixToVolumeList(voxmat, mat, mask, default = NA)

Arguments

voxmat
an N by 3 matrix of voxel coordinates
mat
an N by M matrix of values where M is the number of volumes to create (e.g. one volume per column in mat)
mask
a reference volume defining the geometry of the output volumes. This can either be of type BrainSpace or BrainVolume
default
the value that will be used for voxels not contained within voxmat (defualt is NA)

Value

a list of BrainVolume instances, one for each column of mat