Read an affine matrix from a file
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 required attributes are set. The type of the
matrix must be specified, as there are differing conventions across
software packages.
readAffine(fileName, source = NULL, target = NULL, type = NULL)
fileName |
A string giving the file name to read the affine matrix from. |
source |
The source image for the transformation. If |
target |
The target image for the transformation. If |
type |
The type of the affine matrix, which describes what convention
is it is stored with. Currently valid values are |
An matrix with class "affine"
, converted to the NiftyReg
convention and with source
and target
attributes set
appropriately.
Jon Clayden <code@clayden.org>
print(readAffine(system.file("extdata","affine.txt",package="RNiftyReg")))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.