Commit a8ef0d752d8ffc9b25b14d6f2eb1a12802fb799c
1 parent
ef8195bd
Exists in
master
and in
68 other branches
ENH: Improvements in cursor position
Showing
1 changed file
with
12 additions
and
4 deletions
Show diff stats
invesalius/data/viewer_slice.py
@@ -913,11 +913,11 @@ class Viewer(wx.Panel): | @@ -913,11 +913,11 @@ class Viewer(wx.Panel): | ||
913 | 913 | ||
914 | pos = [x, y, z] | 914 | pos = [x, y, z] |
915 | if self.orientation == "AXIAL": | 915 | if self.orientation == "AXIAL": |
916 | - pos[2] = pos[2] * 1.0001 | 916 | + pos[2] = pos[2] * 1.001 |
917 | elif self.orientation == "SAGITAL": | 917 | elif self.orientation == "SAGITAL": |
918 | - pos[0] = pos[0] * 1.0001 | 918 | + pos[0] = pos[0] * 1.001 |
919 | else: | 919 | else: |
920 | - pos[1] = pos[1] * 1.0001 | 920 | + pos[1] = pos[1] * 1.001 |
921 | print ">POS", pos | 921 | print ">POS", pos |
922 | self.cross.SetFocalPoint(pos) | 922 | self.cross.SetFocalPoint(pos) |
923 | 923 | ||
@@ -949,7 +949,15 @@ class Viewer(wx.Panel): | @@ -949,7 +949,15 @@ class Viewer(wx.Panel): | ||
949 | else: | 949 | else: |
950 | coordinates = {"SAGITAL": yz, "CORONAL": xz, "AXIAL": xy} | 950 | coordinates = {"SAGITAL": yz, "CORONAL": xz, "AXIAL": xy} |
951 | 951 | ||
952 | - slice_data.cursor.SetPosition((x, y, z)) | 952 | + pos = [x, y, z] |
953 | + if self.orientation == "AXIAL": | ||
954 | + pos[2] = pos[2] * 1.001 | ||
955 | + elif self.orientation == "SAGITAL": | ||
956 | + pos[0] = pos[0] * 1.001 | ||
957 | + else: | ||
958 | + pos[1] = pos[1] * 1.001 | ||
959 | + print ">POS", pos | ||
960 | + slice_data.cursor.SetPosition(pos) | ||
953 | 961 | ||
954 | def SetOrientation(self, orientation): | 962 | def SetOrientation(self, orientation): |
955 | self.orientation = orientation | 963 | self.orientation = orientation |