freesurferformats: R Package For Reading and Writing Neuroimaging File Formats
The 'freesurferformats' package is an R library for reading and writing neuroimaging file formats. The focus is on structural MRI file formats from the FreeSurfer brain imaging software suite, but a range of other file formats are supported as well. The package can be used to read 3D and 4D volume files (brain models, segemntations, voxel-wise results), 2D surface-based morphometry data (e.g., cortical thickness maps), brain surface meshes, atlas-based parcellations and labels, surface patches, and spatial transformation matrices in various file formats. The vast majority of formats can also be written. The related 'fsbrain' package can be used to visualize neuroimaging data directly in R.