From d9daf15769d03e3802e170c332c49687e65be242 Mon Sep 17 00:00:00 2001 From: okahilak Date: Thu, 16 Sep 2021 18:22:37 +0300 Subject: [PATCH] FIX: Bug in object registration, causing navigation to not work (#349) --- invesalius/data/bases.py | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/invesalius/data/bases.py b/invesalius/data/bases.py index ae29521..0d17efe 100644 --- a/invesalius/data/bases.py +++ b/invesalius/data/bases.py @@ -188,6 +188,13 @@ def object_registration(fiducials, orients, coord_raw, m_change): fids_raw[ic, :] = dco.dynamic_reference_m2(coords[ic, :], coords[3, :])[:3] # compute initial alignment of probe fixed in the object in source frame + + # XXX: Some duplicate processing is done here: the Euler angles are calculated once by + # the lines below, and then again in dco.coordinates_to_transformation_matrix. + # + a, b, g = np.radians(coords[3, 3:]) + r_s0_raw = tr.euler_matrix(a, b, g, axes='rzyx') + s0_raw = dco.coordinates_to_transformation_matrix( position=coords[3, :3], orientation=coords[3, 3:], -- libgit2 0.21.2