R2Q: Rotation to quaternion

Description Usage Arguments Value See Also Examples

View source: R/niftiFMRI.R

Description

Convert from (proper) rotation matrix to quaternion form.

Usage

1
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

1
2
3
4
5
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)

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

Related to R2Q in AnalyzeFMRI...