37#ifndef _msh3Utilities_h
38#define _msh3Utilities_h
142 if (DotProd >= 0.8660) {
148 return XProd.Normalized()*acos(DotProd);
161 if (DotProd >= 0.9962) {
167 return XProd.Normalized()*acos(DotProd);
199 assert(sk.rows() == 3 && sk.cols() == 3);
213 return std::round(d*1E6)/1E6;
217 return std::round(d*1E3)/1E3;
220inline std::string
ltrim(
const std::string& s) {
221 return std::regex_replace(s, std::regex(
"^\\s+"), std::string(
""));
224inline std::string
rtrim(
const std::string& s) {
225 return std::regex_replace(s, std::regex(
"\\s+$"), std::string(
""));
228inline std::string
trim(
const std::string& s) {
ThisType & Assign(const vctDynamicConstMatrixBase< __matrixOwnerType, value_type > &other)
Definition vctDynamicMatrixBase.h:509
Dynamic matrix referencing existing memory.
Definition vctDynamicMatrixRef.h:75
Definition vctForwardDeclarations.h:131
TransposeValueType Transpose() const
Definition vctFixedSizeConstMatrixBase.h:1060
ColumnRefType Column(size_type index)
Definition vctFixedSizeMatrixBase.h:249
RowRefType Row(size_type index)
Definition vctFixedSizeMatrixBase.h:244
ThisType & ProductOf(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, value_type, __dataPtrType > &matrix, const value_type scalar)
Definition vctFixedSizeMatrixBase.h:909
reference Element(size_type rowIndex, size_type colIndex)
Definition vctFixedSizeMatrixBase.h:231
ThisType & Assign(const vctFixedSizeConstMatrixBase< _rows, _cols, __rowStride, __colStride, __elementType, __dataPtrType > &other)
Definition vctFixedSizeMatrixBase.h:475
Implementation of a fixed-size vector using template metaprogramming.
Definition vctFixedSizeVector.h:54
void CISST_EXPORT ComputeCovEigenDecomposition_SVD(const vct2x2 &C, vct2 &eigVal, vct2x2 &eigVct)
vctRot3 euler2rot(double yaw, double pitch, double roll)
std::string trim(const std::string &s)
Definition msh3Utilities.h:228
vct3 vctCentroid(const vctDynamicVector< vct3 > &A)
vct3x3 skew(const vct3 &v)
Definition msh3Utilities.h:181
const double m_to_mm
Definition msh3Utilities.h:243
std::string ltrim(const std::string &s)
Definition msh3Utilities.h:220
double round3(double d)
Definition msh3Utilities.h:216
void ComputeCovInverse_SVD(const vct3x3 &M, vct3x3 &Minv)
void ComputeRodriguesJacobians(const vct3 &a, vctFixedSizeVector< vctRot3, 3 > &dRa)
void ComputeCovEigenValues_Trig(const vct3x3 &M, vct3 &eigenValues)
void ComputeCovEigenDecomposition_NonIter(const vct3x3 &M, vct3 &eigenValues, vct3x3 &eigenVectors)
vct3 ApproxRodriguesRotationBetweenUnitVectors(double DotProd, const vct3 &XProd)
Definition msh3Utilities.h:116
vct3 RodriguesRotationBetweenUnitVectors(double DotProd, const vct3 &XProd)
Definition msh3Utilities.h:153
void ComputeCovEigenValues_SVD(const vct3x3 &M, vct3 &eigenValues)
std::string rtrim(const std::string &s)
Definition msh3Utilities.h:224
vct3x3 ComputePointCovariance(const vct3 &norm, double normPerpVar, double normPrllVar)
void ComputeCovInverse_Nmr(const vct3x3 &M, vct3x3 &Minv)
void ComputeCovEigenDecomposition_SEP(const vct3x3 &M, vct3 &eigenValues, vct3x3 &eigenVectors)
vct3 vctWeightedMean(const vctDynamicVector< vct3 > &A, const vctDoubleVec &W)
size_t sub2ind(const vctFixedSizeVector< size_t, 3 > &size, const size_t i, const size_t j, const size_t k)
Definition msh3Utilities.h:207
double round6(double d)
Definition msh3Utilities.h:212
vct3x3 & Calc_RMRt(vct3x3 &R, vct3x3 &M)
Definition msh3Utilities.h:97
vctDoubleVec linspace(const double &min, const double &max, const int &n)
void ComputeCovInverse_NonIter(const vct3x3 &M, vct3x3 &Minv)
vctDoubleVec ComputeInverseTrilinearInterp(const vct3 &p, const vctDynamicVector< vct3 > &points)
size_type size(void) const
Definition vctDynamicConstMatrixBase.h:228
const value_type & W(void) const
Definition vctDynamicConstVectorBase.h:286
_elementType vctDotProduct(const vctDynamicConstVectorBase< _vector1OwnerType, _elementType > &vector1, const vctDynamicConstVectorBase< _vector2OwnerType, _elementType > &vector2)
Definition vctDynamicConstVectorBase.h:1087
Typedef for dynamic vectors.
vctDynamicVector< double > vctDoubleVec
Definition vctDynamicVectorTypes.h:37
Typedef for fixed size matrices.
vctFixedSizeMatrix< double, 3, 3 > vct3x3
Definition vctFixedSizeMatrixTypes.h:59
Typedef for fixed size vectors.
vctFixedSizeVector< double, 3 > vct3
Definition vctFixedSizeVectorTypes.h:46