MIRTK
MIRTK copied to clipboard
Singularity tolerance seems too large in Modules/Numerics/src/Matrix.cc
I had problems with average-dofs reporting a singular matrix in MatrixToAffineParameters.
I checked with a debugger and the matrix values were fine, just rather small for my data, eg. 0.0005 etc. I added a couple more zeros to TOL and everything seems OK again.
https://github.com/BioMedIA/MIRTK/blob/master/Modules/Numerics/src/Matrix.cc#L1452
void MatrixToAffineParameters(const Matrix &m,
double &tx, double &ty, double &tz,
double &rx, double &ry, double &rz,
double &sx, double &sy, double &sz,
double &sxy, double &sxz, double &syz)
{
const double TOL = 0.000001;
double tansxy, tansxz, tansyz;
There are plenty of other TOLs in that file, it might make sense to revise some other too.