Learn R Programming

freesurferformats (version 1.1.0)

guess.transform.format: Determine the format of a transformation file.

Description

Guess the format of a transformation file from its extension and its content. Content is needed because the extension '.mat' is used by FSL for text matrices and by ANTs/ITK for binary transformations, which have nothing in common. A file that is identified as an ITK/ANTs transformation is reported as such instead of failing with a parse error, since that format is not supported yet.

Usage

guess.transform.format(filepath)

Value

character string, the file format, one of 'xfm', 'dat', 'lta' or 'fslmat'.

Arguments

filepath

character string, the full path to the transform file.