R2Q {AnalyzeFMRI}R Documentation

Rotation to quaternion

Description

Convert from (proper) rotation matrix to quaternion form.

Usage

R2Q(R,qfac=NULL)

Arguments

R

Rotation matrix

qfac

qfac nifti field. It is pixdim[1]. If NULL, R is transformed to have determinant 1

Value

The quaternion.

See Also

Q2R

Examples

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

[Package AnalyzeFMRI version 1.1-24 Index]