Reading GIFTI files in R

John Muschelli



GIFTI files have surface data that can be rendered in R. Overall, they contain data that is stored in standard XML formats. We provide some utilities that rely on the XML parsing of the xml2 package, mainly the readgii function. The read_gifti and readGIfTI functions are duplicates of the readgii function, but were made for ease of use for programmers who are used to the readNIfTI function from the oro.nifti package.

Getting the Data

We provide some test data with the package, but must be downloaded using download_gifti_data. We also provide a test function that allows a user to check if the data is downloaded, which is useful for examples or vignettes, such as this one.

If this is false, we can combine these to ensure the data is downloaded: