Skip to content

Commit

Permalink
COMP: Avoid type conversion errors on Mac with new ITK
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpa committed Jan 17, 2024
1 parent 62550fc commit e18b1d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tensor/TensorFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ GetMetricTensorCost(TVectorType dpath, TTensorType dtv, unsigned int matrixpower
vec(0, 0) = dpath[0];
vec(1, 0) = dpath[1];
vec(2, 0) = dpath[2];
MatrixType inv = vnl_matrix_inverse<double>(DT);
MatrixType inv = vnl_matrix_inverse<double>(DT).inverse();
for (unsigned int lo = 1; lo < matrixpower; lo++)
{
inv = inv * inv;
Expand Down Expand Up @@ -837,7 +837,7 @@ GetMetricTensorCost(itk::Vector<float, 3> dpath, TTensorType dtv)
vec(0, 0) = dpath[0];
vec(1, 0) = dpath[1];
vec(2, 0) = dpath[2];
MatrixType inv = vnl_matrix_inverse<double>(DT);
MatrixType inv = vnl_matrix_inverse<double>(DT).inverse();

MatrixType sol = vec.transpose() * inv * vec;
float cost = sol(0, 0) / etot;
Expand Down

0 comments on commit e18b1d2

Please sign in to comment.