ts2matrix {voxel} | R Documentation |
Timeseries to Matrix
Description
This function is able to mask a 4-Dimensional image and create a matrix from it. Each column represents the same voxel in the xyz array while the rows represent the t-dimension.
Usage
ts2matrix(image, mask)
Arguments
image |
Input image of type 'nifti' |
mask |
Input mask of type 'nifti'. Must be a binary mask |
Examples
image <- oro.nifti::nifti(img = array(1:64, dim =c(4,4,4,5)))
mask <- oro.nifti::nifti(img = array(0:1, dim = c(4,4,4)))
matrix <- ts2matrix(image, mask)
[Package voxel version 1.3.5 Index]