Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singularity tolerance seems too large in Modules/Numerics/src/Matrix.cc #758

Open
jcupitt opened this issue Dec 4, 2020 · 0 comments
Open

Comments

@jcupitt
Copy link
Contributor

jcupitt commented Dec 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant