Commit b2c66ba7b6ab4cb181a11df3e5490c648d10bebe
1 parent
50563675
Exists in
master
FIX: Invert affine for converting to the world space system
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
invesalius/data/imagedata_utils.py
... | ... | @@ -630,7 +630,7 @@ def convert_invesalius_to_world(position, orientation): |
630 | 630 | orientation=orientation, |
631 | 631 | axes='sxyz', |
632 | 632 | ) |
633 | - M_world = slice.affine @ M_invesalius | |
633 | + M_world = np.linalg.inv(slice.affine) @ M_invesalius | |
634 | 634 | |
635 | 635 | position_world, orientation_world = dco.transformation_matrix_to_coordinates( |
636 | 636 | M_world, | ... | ... |