Apply affine transformation, like a vox2ras_tkr transformation, to input. This is just matrix multiplication for different input objects.
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., thevox2rasmatrix of the respective volume. See themghheader.*functions in the freesurferformats package to obtain these matrices.