powered by
Convert from (proper) rotation matrix to quaternion form.
R2Q(R,qfac=NULL)
Rotation matrix
qfac nifti field. It is pixdim[1]. If NULL, R is transformed to have determinant 1
The quaternion.
Q2R
# NOT RUN { 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) # }
Run the code above in your browser using DataLab