A utility class that contains static functions for various useful commonly used computations.
More...
#include <src/PlusCommon/PlusMath.h>
|
static void | ConvertVnlMatrixToVtkMatrix (const vnl_matrix_fixed< double, 4, 4 > &inVnlMatrix, vtkMatrix4x4 *outVtkMatrix) |
|
static void | ConvertVtkMatrixToVnlMatrix (const vtkMatrix4x4 *inVtkMatrix, vnl_matrix_fixed< double, 4, 4 > &outVnlMatrix) |
|
static void | LogMatrix (const vnl_matrix_fixed< double, 4, 4 > &matrix, int precision=3) |
|
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) |
|
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) |
|
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) |
|
static void | PrintMatrix (vnl_matrix_fixed< double, 4, 4 > matrix, std::ostringstream &stream, int precision=3) |
|
|
static PlusStatus | RemoveOutliersFromLSQR (vnl_sparse_matrix< double > &sparseMatrixLeftSide, vnl_vector< double > &vectorRightSide, vnl_vector< double > &resultVector, bool &outlierFound, double thresholdMultiplier=3.0, double *mean=NULL, double *stdev=NULL, vnl_vector< unsigned int > *nonOutlierIndices=NULL) |
|
A utility class that contains static functions for various useful commonly used computations.
Definition at line 37 of file PlusMath.h.
◆ PlusMath()
◆ ~PlusMath()
◆ ConvertVnlMatrixToVtkMatrix()
void PlusMath::ConvertVnlMatrixToVtkMatrix |
( |
const vnl_matrix_fixed< double, 4, 4 > & |
inVnlMatrix, |
|
|
vtkMatrix4x4 * |
outVtkMatrix |
|
) |
| |
|
static |
Convert matrix between VTK and VNL
Definition at line 361 of file PlusMath.cxx.
◆ ConvertVtkMatrixToVnlMatrix()
void PlusMath::ConvertVtkMatrixToVnlMatrix |
( |
const vtkMatrix4x4 * |
inVtkMatrix, |
|
|
vnl_matrix_fixed< double, 4, 4 > & |
outVnlMatrix |
|
) |
| |
|
static |
◆ LogMatrix()
void PlusMath::LogMatrix |
( |
const vnl_matrix_fixed< double, 4, 4 > & |
matrix, |
|
|
int |
precision = 3 |
|
) |
| |
|
static |
◆ LSQRMinimize() [1/3]
PlusStatus PlusMath::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 |
|
) |
| |
|
static |
Solve Ax = b sparse linear equations with robust linear least squares method (vnl_lsqr and outlier removal)
- Parameters
-
aMatrix | The coefficient matrix of size m-by-n. |
bVector | Column vector of length m. |
mean | Pointer to get the resulting mean of the the LSQR fit error |
stdev | Pointer to get the resulting standard deviation of the the LSQR fit error |
resultVector | to store the results |
notOutlierIndices | Row that were not removed during the outliers rejection process |
Definition at line 34 of file PlusMath.cxx.
◆ LSQRMinimize() [2/3]
PlusStatus PlusMath::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 |
|
) |
| |
|
static |
Solve Ax = b sparse linear equations with robust linear least squares method (vnl_lsqr and outlier removal)
- Parameters
-
aMatrix | The coefficient matrix of size m-by-n. |
bVector | Column vector of length m. |
mean | Pointer to get the resulting mean of the the LSQR fit error |
stdev | Pointer to get the resulting standard deviation of the the LSQR fit error |
resultVector | to store the results |
notOutlierIndices | Row that were not removed during the outliers rejection process |
Definition at line 70 of file PlusMath.cxx.
◆ LSQRMinimize() [3/3]
PlusStatus PlusMath::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 |
|
) |
| |
|
static |
Solve Ax = b sparse linear equations with robust linear least squares method (vnl_lsqr and outlier removal)
- Parameters
-
sparseMatrixLeftSide | The coefficient matrix of size m-by-n. (aMatrix) |
vectorRightSide | Column vector of length m. (bVector) |
mean | Pointer to get the resulting mean of the the LSQR fit error |
stdev | Pointer to get the resulting standard deviation of the the LSQR fit error |
resultVector | to store the results |
Definition at line 111 of file PlusMath.cxx.
◆ PrintMatrix()
void PlusMath::PrintMatrix |
( |
vnl_matrix_fixed< double, 4, 4 > |
matrix, |
|
|
std::ostringstream & |
stream, |
|
|
int |
precision = 3 |
|
) |
| |
|
static |
◆ RemoveOutliersFromLSQR()
PlusStatus PlusMath::RemoveOutliersFromLSQR |
( |
vnl_sparse_matrix< double > & |
sparseMatrixLeftSide, |
|
|
vnl_vector< double > & |
vectorRightSide, |
|
|
vnl_vector< double > & |
resultVector, |
|
|
bool & |
outlierFound, |
|
|
double |
thresholdMultiplier = 3.0 , |
|
|
double * |
mean = NULL , |
|
|
double * |
stdev = NULL , |
|
|
vnl_vector< unsigned int > * |
nonOutlierIndices = NULL |
|
) |
| |
|
staticprotected |
Remove outliers from Ax = b sparse linear equations after linear least squares method (vnl_lsqr)
Definition at line 196 of file PlusMath.cxx.
The documentation for this class was generated from the following files: