R2Q: Rotation to quaternion

View source: R/niftiFMRI.R

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

AnalyzeFMRI documentation built on Aug. 8, 2025, 7:16 p.m.

Related to R2Q in AnalyzeFMRI...