write.fs.morph: Write morphometry data in a format derived from the given...

View source: R/write_fs_curv.R

write.fs.morphR Documentation

Write morphometry data in a format derived from the given file name.

Description

Given data and a morphometry file name, derive the proper format from the file extension and write the file.

Usage

write.fs.morph(filepath, data, format = "auto", ...)

Arguments

filepath

string. The full file name. The format to use will be derived from the last characters, the suffix. Supported suffixes are "mgh" for MGH format, "mgz" for MGZ format, "smp" for Brainvoyager SMP format, "nii" or "nii.gz" for NIFTI v1 format, "gii" or "gii.gz" for GIFTI format, everything else will be treated as curv format.

data

numerical vector. The data to write.

format

character string, the format to use. One of c("auto", "mgh", "mgz", "curv", "n1", "ni2", "gii"). The default setting "auto" will determine the format from the file extension.

...

additional parameters to pass to the respective writer function.

Value

character string. The format that was used to write the data. One of c("auto", "mgh", "mgz", "curv", "ni1", "ni2", "gii").

See Also

Other morphometry functions: fs.get.morph.file.ext.for.format(), fs.get.morph.file.format.from.filename(), read.fs.curv(), read.fs.mgh(), read.fs.morph.gii(), read.fs.morph(), read.fs.volume(), read.fs.weight(), write.fs.curv(), write.fs.label.gii(), write.fs.mgh(), write.fs.morph.asc(), write.fs.morph.gii(), write.fs.morph.ni1(), write.fs.morph.ni2(), write.fs.morph.smp(), write.fs.morph.txt(), write.fs.weight.asc(), write.fs.weight()


freesurferformats documentation built on May 29, 2024, 5:29 a.m.