Learn R Programming

VertexWiseR (version 1.3.1)

surf_to_vol: Surface to volume

Description

Converts surface data to volumetric data (.nii file)

Usage

surf_to_vol(surf_data, filename, VWR_check = TRUE)

Value

A .nii volume file

Arguments

surf_data

A numeric vector or object containing the surface data, either in fsaverage5 (1 x 20484 vertices) or fsLR32k (1 x 64984 vertices) space. It can only be one row of vertices (not a cohort surface data matrix).

filename

A string object containing the desired name of the output .nii file (default is 'output.nii' in the R temporary directory (tempdir())).

VWR_check

A boolean object specifying whether to check and validate system requirements. Default is TRUE.

Examples

Run this code
CTv = runif(20484,min=0, max=100);
surf_to_vol(CTv, filename = paste0(tempdir(),'/volume.nii'), VWR_check=FALSE)

Run the code above in your browser using DataLab