Learn R Programming

freesurferformats (version 0.1.18)

fs.get.morph.file.format.from.filename: Determine morphometry file format from filename

Description

Given a morphometry file name, derive the proper file format, based on the end of the string. Case is ignored, i.e., cast to lowercase before checks. If the filepath ends with "mgh", returns format "mgh". For suffix "mgz", returns "mgz" format. For all others, returns "curv" format.

Usage

fs.get.morph.file.format.from.filename(filepath)

Value

format, string. The format, one of c("mgz", "mgh", "curv", "gii", "smp").

Arguments

filepath,

string. A path to a file.

See Also

Other morphometry functions: fs.get.morph.file.ext.for.format(), 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.morph(), write.fs.weight.asc(), write.fs.weight()