Commit 8a7bb4b3f432008342635f5b26099ca346c17c5e

Authored by Paulo Henrique Junqueira Amorim
1 parent 35f054eb

FIX: Bug in the sycronize 3D plane with slices if study is coronal or sagital

Showing 1 changed file with 12 additions and 0 deletions   Show diff stats
invesalius/data/viewer_slice.py
@@ -1013,6 +1013,18 @@ class Viewer(wx.Panel): @@ -1013,6 +1013,18 @@ class Viewer(wx.Panel):
1013 def OnScrollBar(self, evt=None): 1013 def OnScrollBar(self, evt=None):
1014 pos = self.scroll.GetThumbPosition() 1014 pos = self.scroll.GetThumbPosition()
1015 self.set_slice_number(pos) 1015 self.set_slice_number(pos)
  1016 + original_orientation = project.Project().original_orientation
  1017 +
  1018 + if (self.orientation == "CORONAL") and \
  1019 + (original_orientation == const.AXIAL):
  1020 + pos = abs(self.scroll.GetRange() - pos)
  1021 + elif(self.orientation == "AXIAL") and \
  1022 + (original_orientation == const.CORONAL):
  1023 + pos = abs(self.scroll.GetRange() - pos)
  1024 + elif(self.orientation == "AXIAL") and \
  1025 + (original_orientation == const.SAGITAL):
  1026 + pos = abs(self.scroll.GetRange() - pos)
  1027 +
1016 ps.Publisher().sendMessage('Change slice from slice plane',\ 1028 ps.Publisher().sendMessage('Change slice from slice plane',\
1017 (self.orientation, pos)) 1029 (self.orientation, pos))
1018 self.cursor_.Show(1) 1030 self.cursor_.Show(1)