powered by
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.
ts2matrix(image, mask)
Input image of type 'nifti'
Input mask of type 'nifti'. Must be a binary mask
# NOT RUN { 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) # }
Run the code above in your browser using DataLab