10 #include "PlusConfigure.h" 11 #include "vtkPlusCommonExport.h" 15 #include "vnl/vnl_matrix_fixed.h" 16 #include "vnl/vnl_vector.h" 17 #include "vnl/vnl_sparse_matrix.h" 20 #include <igsioMath.h> 25 #if _MSC_VER == 1600 // VS 2010 28 double vtkPlusCommonExport round(
double arg);
50 static PlusStatus LSQRMinimize(
const std::vector< std::vector<double> > &aMatrix,
const std::vector<double> &bVector, vnl_vector<double> &resultVector,
double* mean = NULL,
double* stdev = NULL, vnl_vector<unsigned int>* notOutliersIndices=NULL);
60 static PlusStatus LSQRMinimize(
const std::vector<vnl_vector<double> > &aMatrix,
const std::vector<double> &bVector, vnl_vector<double> &resultVector,
double* mean = NULL,
double* stdev = NULL , vnl_vector<unsigned int>* notOutliersIndices=NULL);
69 static PlusStatus LSQRMinimize(
const vnl_sparse_matrix<double> &sparseMatrixLeftSide,
const vnl_vector<double> &vectorRightSide, vnl_vector<double> &resultVector,
double* mean = NULL,
double* stdev = NULL, vnl_vector<unsigned int>* notOutliersIndices=NULL);
72 static void ConvertVnlMatrixToVtkMatrix(
const vnl_matrix_fixed<double,4,4>& inVnlMatrix, vtkMatrix4x4* outVtkMatrix);
73 static void ConvertVtkMatrixToVnlMatrix(
const vtkMatrix4x4* inVtkMatrix, vnl_matrix_fixed<double,4,4>& outVnlMatrix );
77 static void PrintMatrix(vnl_matrix_fixed<double,4,4> matrix, std::ostringstream &stream,
int precision = 3);
80 static void LogMatrix(
const vnl_matrix_fixed<double,4,4>& matrix,
int precision = 3);
88 vnl_sparse_matrix<double> &sparseMatrixLeftSide,
89 vnl_vector<double> &vectorRightSide,
90 vnl_vector<double> &resultVector,
92 double thresholdMultiplier = 3.0,
95 vnl_vector<unsigned int>* nonOutlierIndices = NULL
A utility class that contains static functions for various useful commonly used computations.