Learn R Programming

RNiftyReg (version 0.4.1)

readAffine: Read an affine matrix from a file

Description

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)

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" (which is believed to correspond to the convention used by the SPM software), and "fsl" (for FSL FLIRT).

Value

  • An affine matrix with affineType attribute set to the value of the type parameter.

See Also

read.table, writeAffine, convertAffine