Write morphometry data for a group into a single MGH or MGZ file. In neuroimaging, the first 3 dimensions in the resulting 4D volume file are space, and the 4th is the time/subject dimension.
write.group.morph.standard.sf(filepath, data)
character string, path to the target file, should end with '.mgh' or '.mgz'.
numerical 2D matrix, with the rows identifying the subjects and the columns identifying the vertices.
if (FALSE) {
# create per-vertex data for 5 subjects.
mat = matrix(rnorm(5 * 163842, 3.0, 0.5), nrow=5, ncol = 163842);
fsbrain::write.group.morph.standard.sf("~/group_pvd.mgz", mat);
}
Run the code above in your browser using DataLab