From b2c66ba7b6ab4cb181a11df3e5490c648d10bebe Mon Sep 17 00:00:00 2001 From: Victor Hugo Souza Date: Mon, 27 Sep 2021 14:51:03 +0300 Subject: [PATCH] FIX: Invert affine for converting to the world space system --- invesalius/data/imagedata_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invesalius/data/imagedata_utils.py b/invesalius/data/imagedata_utils.py index 09409bf..ab5358e 100644 --- a/invesalius/data/imagedata_utils.py +++ b/invesalius/data/imagedata_utils.py @@ -630,7 +630,7 @@ def convert_invesalius_to_world(position, orientation): orientation=orientation, axes='sxyz', ) - M_world = slice.affine @ M_invesalius + M_world = np.linalg.inv(slice.affine) @ M_invesalius position_world, orientation_world = dco.transformation_matrix_to_coordinates( M_world, -- libgit2 0.21.2