namespace absor¶
Overview¶
namespace absor {
// global functions
int hornAbsOrientation(const Eigen::MatrixXd& refPoints, const Eigen::MatrixXd& targetPoints, std::vector<double>& quat, double& rmsd, std::vector<double>& rmsdList, double& scale);
Eigen::MatrixXd calcMatrixS(const Eigen::MatrixXd& centeredRefPnts, const Eigen::MatrixXd& centeredTargetPnts, int nop, int dim);
Eigen::MatrixXd calcMatrixN(const Eigen::MatrixXd& S);
Eigen::MatrixXd centerWRTcentroid(const Eigen::MatrixXd& pointSet);
double calcScaleFactor(const Eigen::MatrixXd& rightSys, const Eigen::MatrixXd& leftSys, int n);
Eigen::MatrixXd quat2RotMatrix(const Eigen::VectorXd& quat);
double getRMSD(const Eigen::MatrixXd& centeredRefPnts, const Eigen::MatrixXd& centeredTargetPnts, const Eigen::VectorXd& quat, std::vector<double>& rmsdList, int nop, double scale);
} // namespace absor
Detailed Documentation¶
Global Functions¶
int hornAbsOrientation(const Eigen::MatrixXd& refPoints, const Eigen::MatrixXd& targetPoints, std::vector<double>& quat, double& rmsd, std::vector<double>& rmsdList, double& scale)
Get the absolute orientation using Horn’s algorithm (with quaternions)
Eigen::MatrixXd calcMatrixS(const Eigen::MatrixXd& centeredRefPnts, const Eigen::MatrixXd& centeredTargetPnts, int nop, int dim)
Compute the matrix S, or M, whose elements are the sums of products of coordinates measured in the left and right systems.
Eigen::MatrixXd calcMatrixN(const Eigen::MatrixXd& S)
Compute the matrix N, a 4x4 symmetric matrix, by combining sums (saved as elements in the matrix S)
Eigen::MatrixXd centerWRTcentroid(const Eigen::MatrixXd& pointSet)
Center a point set wrt the centroid.
double calcScaleFactor(const Eigen::MatrixXd& rightSys, const Eigen::MatrixXd& leftSys, int n)
Calculate the scale factor from the centered left and right point sets.
Eigen::MatrixXd quat2RotMatrix(const Eigen::VectorXd& quat)
Get a rotation matrix from a unit quaternion.
double getRMSD(const Eigen::MatrixXd& centeredRefPnts, const Eigen::MatrixXd& centeredTargetPnts, const Eigen::VectorXd& quat, std::vector<double>& rmsdList, int nop, double scale)
Calculate the RMSD.