Q2R: Quaternion to rotation

Description

Generate a (proper) rotation matrix from a quaternion.

Usage

1
Q2R(Q,qfac)

Arguments

Q

quaternion vector

qfac

qfac nifti field. It is pixdim[1]

Value

The rotation.

See Also

R2Q

Examples

1
2
3
L <- f.read.nifti.header(system.file("example-nifti.hdr", package="AnalyzeFMRI"))
Q <- c(L$quatern.b,L$quatern.c,L$quatern.d)
Q2R(Q,L$pixdim[1])

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.