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 | 913 | |
914 | 914 | pos = [x, y, z] |
915 | 915 | if self.orientation == "AXIAL": |
916 | - pos[2] = pos[2] * 1.0001 | |
916 | + pos[2] = pos[2] * 1.001 | |
917 | 917 | elif self.orientation == "SAGITAL": |
918 | - pos[0] = pos[0] * 1.0001 | |
918 | + pos[0] = pos[0] * 1.001 | |
919 | 919 | else: |
920 | - pos[1] = pos[1] * 1.0001 | |
920 | + pos[1] = pos[1] * 1.001 | |
921 | 921 | print ">POS", pos |
922 | 922 | self.cross.SetFocalPoint(pos) |
923 | 923 | |
... | ... | @@ -949,7 +949,15 @@ class Viewer(wx.Panel): |
949 | 949 | else: |
950 | 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 | 962 | def SetOrientation(self, orientation): |
955 | 963 | self.orientation = orientation | ... | ... |