mat34.to.TRSZ: Affine 4x4 (or 3x4) matrix to Translation, Rotation, Shear...

Description Usage Arguments Details Value See Also Examples

View source: R/niftiFMRI.R

Description

Extract in that order Translation, Rotation, Shear and Scale from a 4x4 (or 3x4) affine matrix from a NIFTI header list (srow.x, srow.y, srow.z).

Usage

1

Arguments

M

the affine matrix

Details

Decomposes M using the convention: M = translation * scale * skew * rotation. Be careful that rotation can be improper.

Value

A list containing Translation, Scale, Shear and Rotation. Rotation decomposition is also provided (rotation = RotZ*RotY*RotX*Ref where Ref is a Reflexion if the rotation is improper or is Identity if the rotation is proper).

See Also

R2Q Q2R mat34.to.TZSR

Examples

1
2
3
L <- f.read.nifti.header(system.file("example-nifti.hdr", package="AnalyzeFMRI"))
M <- rbind(L$srow.x,L$srow.y,L$srow.z)
mat34.to.TRSZ(M)

AnalyzeFMRI documentation built on Oct. 5, 2021, 5:06 p.m.