From 321276b92e23444a782a3438dcf36bb3051c03ec Mon Sep 17 00:00:00 2001 From: root Date: Sat, 3 Aug 2024 15:08:03 +0500 Subject: [PATCH 1/2] Fix coregistration button positions --- invesalius/constants.py | 40 +++++++++++++++---------------- invesalius/data/markers/marker.py | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/invesalius/constants.py b/invesalius/constants.py index b860159bb..39382bb3d 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -854,22 +854,22 @@ TR3 = wx.NewIdRef() SET = wx.NewIdRef() -FIDUCIAL_LABELS = ["Left Ear: ", "Right Ear: ", "Nose: "] +FIDUCIAL_LABELS = ["Right Ear: ", "Left Ear: ", "Nose: "] FIDUCIAL_REGISTRATION_ORDER = [0, 2, 1] IMAGE_FIDUCIALS = [ { "button_id": IR1, - "label": "Left Ear", - "fiducial_name": "LE", + "label": "Right Ear", + "fiducial_name": "RE", "fiducial_index": 0, - "tip": _("Select left ear in image"), + "tip": _("Select right ear in image"), }, { "button_id": IR2, - "label": "Right Ear", - "fiducial_name": "RE", + "label": "Left Ear", + "fiducial_name": "LE", "fiducial_index": 1, - "tip": _("Select right ear in image"), + "tip": _("Select left ear in image"), }, { "button_id": IR3, @@ -883,17 +883,17 @@ TRACKER_FIDUCIALS = [ { "button_id": TR1, - "label": "Left Ear", - "fiducial_name": "LE", + "label": "Right Ear", + "fiducial_name": "RE", "fiducial_index": 0, - "tip": _("Select left ear with spatial tracker"), + "tip": _("Select right ear with spatial tracker"), }, { "button_id": TR2, - "label": "Right Ear", - "fiducial_name": "RE", + "label": "Left Ear", + "fiducial_name": "LE", "fiducial_index": 1, - "tip": _("Select right ear with spatial tracker"), + "tip": _("Select left ear with spatial tracker"), }, { "button_id": TR3, @@ -904,7 +904,7 @@ }, ] -BTNS_IMG_MARKERS = {IR1: {0: "LEI"}, IR2: {1: "REI"}, IR3: {2: "NAI"}} +BTNS_IMG_MARKERS = {IR1: {0: "REI"}, IR2: {1: "LEI"}, IR3: {2: "NAI"}} OBJL = wx.NewIdRef() OBJR = wx.NewIdRef() @@ -917,16 +917,16 @@ OBJECT_FIDUCIALS = [ { "fiducial_index": 0, - "button_id": OBJL, - "label": _("Left"), - "tip": _("Select left object fiducial"), - }, - { - "fiducial_index": 1, "button_id": OBJR, "label": _("Right"), "tip": _("Select right object fiducial"), }, + { + "fiducial_index": 1, + "button_id": OBJL, + "label": _("Left"), + "tip": _("Select left object fiducial"), + }, { "fiducial_index": OBJECT_FIDUCIAL_ANTERIOR, "button_id": OBJA, diff --git a/invesalius/data/markers/marker.py b/invesalius/data/markers/marker.py index 4bacaa791..b044cad72 100644 --- a/invesalius/data/markers/marker.py +++ b/invesalius/data/markers/marker.py @@ -236,7 +236,7 @@ def from_dict(self, d): if "marker_type" in d: marker_type = d["marker_type"] else: - if d["label"] in ["LEI", "REI", "NAI"]: + if d["label"] in ["REI", "LEI", "NAI"]: marker_type = MarkerType.FIDUCIAL.value elif orientation == [None, None, None]: From 0aa63718a0b7a4afc0e58ab53cd2815253df830b Mon Sep 17 00:00:00 2001 From: Hafsa-shoaib989 Date: Fri, 9 Aug 2024 00:44:10 +0500 Subject: [PATCH 2/2] Always link to latest documentation --- invesalius/gui/frame.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/invesalius/gui/frame.py b/invesalius/gui/frame.py index fabfce240..39ed05bd3 100644 --- a/invesalius/gui/frame.py +++ b/invesalius/gui/frame.py @@ -790,16 +790,7 @@ def ShowGettingStarted(self): """ Show getting started window. """ - session = ses.Session() - if session.GetConfig("language") == "pt_BR": - user_guide = "user_guide_pt_BR.pdf" - else: - user_guide = "user_guide_en.pdf" - - path = os.path.join(inv_paths.DOC_DIR, user_guide) - if sys.platform == "darwin": - path = r"file://" + path - webbrowser.open(path) + webbrowser.open("https://invesalius.github.io/docs/user_guide/user_guide.html") def ShowImportDicomPanel(self): """