Generate a (proper) rotation matrix from a quaternion.
Q2R(Q,qfac)
quaternion vector
qfac nifti field. It is pixdim[1]
The rotation.
# 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)
Q2R(Q,L$pixdim[1])
# }
Run the code above in your browser using DataLab