This function saves a data matrix into a NIfTI file.
output_nii(X, nii, xgrid, file = NULL, std = TRUE, thres = 0)NIfTI-class object.
Data matrix with n rows (sample) and p colums (pixel).
a reference NIfTI-class object, representing a image with p voxels.
Cordinate matrix with p rows (voxel) and d columns (dimension).
The name of the file to be saved.
If TRUE, standarize each row of X.
Quantile to threshold each row of X.