Skip to content

Commit

Permalink
BUG: NIFTI "permissive" direction cosine error
Browse files Browse the repository at this point in the history
Computation from non-orthogonal sform had reversed SVD components

U and V were reversed in the reconstruction of M, according to definitions here

https://vxl.github.io/doc/release/core/vnl/html/classvnl__svd.html
  • Loading branch information
cookpa committed Sep 12, 2024
1 parent 9a5dade commit c42f500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ NiftiImageIO::SetImageIOOrientationFromNIfTI(unsigned short dims, double spacing

if (svd.singularities() == 0)
{
mat = svd.V() * svd.U().conjugate_transpose();
mat = svd.U() * svd.V().conjugate_transpose();
mat44 _mat;

for (int i = 0; i < 3; ++i)
Expand Down

0 comments on commit c42f500

Please sign in to comment.