This function is used to read a 4x4 numeric matrix representing an affine transformation from a file. It is a wrapper around read.table which additionally ensures that the affineType attribute is set. This is required because there are different conventions for storing affine matrices.
Usage
readAffine(fileName, type = NULL)
Arguments
fileName
A string giving the file name to read the affine matrix from.
type
The type of the affine matrix, which describes what convention is it is stored with. Currently valid values are "niftyreg" and "fsl" (for FSL FLIRT). If NULL, the function will look in the file for a comment specifyi
Value
An affine matrix with affineType attribute set appropriately.