37 Eigen::ArrayXd qArray = Eigen::ArrayXd::Zero(7);
38 Eigen::Quaterniond qA;
40 qArray.segment<3>(4) = Tx.matrix().block<3, 1>(0,3);
41 qA = Eigen::Quaterniond(Tx.matrix().block<3, 3>(0,0));
42 qArray.segment<4>(0) = qA.coeffs();
51 Eigen::Quaterniond qA;
53 qA.coeffs() = qArray.segment<4>(0);
54 Tx.matrix().block<3, 3>(0,0) = qA.toRotationMatrix();
55 Tx.matrix().block<3, 1>(0,3) = qArray.segment<3>(4);
Transform3D quaternionToMatrix(Eigen::ArrayXd qArray)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Eigen::ArrayXd matrixToQuaternion(Transform3D Tx)
double roundAwayFromZero(double val)
unsigned int roundUnsigned(double val)
Namespace for all CustusX production code.