Skip to content

Commit

Permalink
dwi2tensor: Fix weights recalculation
Browse files Browse the repository at this point in the history
- Previously, if -iter 1 was specified, the weights were not recomputed, and so results were identical to that with -iter 0.
- Do not unnecessarily recompute weights at completion of the final iteration.
  • Loading branch information
Lestropie committed Feb 7, 2025
1 parent 45d970a commit be4bdaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/dwi2tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Processor { MEMALIGN(Processor)
work.setZero();
work.selfadjointView<Eigen::Lower>().rankUpdate (b.transpose()*w.asDiagonal());
p = llt.compute (work.selfadjointView<Eigen::Lower>()).solve(b.transpose()*w.asDiagonal()*w.asDiagonal()*dwi);
if (maxit > 1)
if (it < maxit)
w = (b*p).array().exp();
}

Expand Down

0 comments on commit be4bdaa

Please sign in to comment.