fs.get.morph.file.format.from.filename {freesurferformats}R Documentation

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)

Arguments

filepath

string. A path to a file.

Value

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

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()


[Package freesurferformats version 0.1.18 Index]