apply.transform: Apply matmult transformation to input.

Description Usage Arguments Value

View source: R/vis_volume_3d.R

Description

Apply affine transformation, like a *vox2ras_tkr* transformation, to input. This is just matrix multiplication for different input objects.

Usage

1
apply.transform(object, matrix_fun)

Arguments

object

numerical vector/matrix or Triangles3D instance, the coorindates or object to transform.

matrix_fun

a 4x4 affine matrix or a function returning such a matrix. If 'NULL', the input is returned as-is. In many cases you way want to use a matrix computed from the header of a volume file, e.g., the 'vox2ras' matrix of the respective volume. See the 'mghheader.*' functions in the *freesurferformats* package to obtain these matrices.

Value

the input after application of the affine matrix (matrix multiplication)


fsbrain documentation built on May 12, 2021, 5:06 p.m.