Skip to contents

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").