A R package for reading and writing NIfTI-1.1 files with voxel-level operations and data frame conversion.
This manual describes the nifti.io R package for handling NIfTI-1.1 files. It provides functions to retrieve header information, read volumes and voxels, and write data frames to NIfTI files. The package supports operations like initializing empty files, reading specific volumes or voxel coordinates, and writing data to specified locations. It is designed for scientific use in neuroimaging and requires unzipped files for proper operation.
The package includes examples for common tasks such as getting image dimensions, spacing, and orientation, initializing new files, and writing model coefficients to NIfTI files. It is maintained by Timothy R. Koscik and licensed under MIT. This manual is written in Chinese.
Use info.nii(nii.file, field = "dimensions") to retrieve the number of voxels.
Use read.nii.voxel(nii.file, coords) where coords is a numeric vector like c(x,y,z,t).
Use table.to.nii(in.table, coords, save.dir, ...) to write a data frame to a specified coordinate in a NIfTI file.