Quaternion to rotation

Share:

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])

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.