31 #include "mirtk/Matrix.h" 32 #include "mirtk/Vector.h" 35 #pragma clang diagnostic push 37 #pragma clang diagnostic ignored "-Wdeprecated-register" 42 #pragma clang diagnostic pop 49 const double EIGEN_TOL = 1.0e-5;
53 inline Eigen::VectorXd VectorToEigen(
const Vector &a)
55 Eigen::VectorXd b(a.Rows());
56 for (
int i = 0; i < a.Rows(); ++i) b(i) = a(i);
61 inline Vector EigenToVector(
const Eigen::VectorXd &a)
63 Vector b(static_cast<int>(a.size()));
64 for (
int i = 0; i < b.Rows(); ++i) b(i) = a(i);
69 inline Eigen::MatrixXd MatrixToEigen(
const Matrix &a)
71 Eigen::MatrixXd b(a.Rows(), a.Cols());
72 for (
int i = 0; i < a.Rows(); ++i)
73 for (
int j = 0; j < a.Cols(); ++j) {
80 inline Matrix EigenToMatrix(
const Eigen::MatrixXd &a)
82 Matrix b(static_cast<int>(a.rows()), static_cast<int>(a.cols()));
83 for (
int i = 0; i < b.Rows(); ++i)
84 for (
int j = 0; j < b.Cols(); ++j) {
93 #endif // MIRTK_Eigen_H