Learn R Programming

RNiftyReg (version 1.1.5)

transformWithAffine: Transform points using an affine matrix

Description

This function is used to transform points from source to target space using an affine transformation, possibly obtained from niftyreg.linear. The exact subvoxel location in target space is returned.

Usage

transformWithAffine(points, affine, source, target, type = NULL)

Arguments

points
A vector giving the coordinates of a point, or a matrix with one point per row. These must be given as voxel-based locations: see transformWorldToVoxel for a function to convert from ``real wo
affine
A 4x4 matrix representing an affine transformation matrix.
source
A "nifti" object representing the source image for the transformation.
target
A "nifti" object representing the target image for the transformation.
type
The convention type of the affine matrix. Currently valid values are "niftyreg" and "fsl" (for FSL FLIRT). If NULL, the code attempts to determine the current type from the affineType attribute of the ma

Value

  • A vector or matrix of transformed points.

See Also

For transforming points using the xform matrix stored in an image, transformVoxelToWorld provides a simpler interface.