Commit 6b364e859cc846e56c52968b8cfed2dfc6982b41
1 parent
84d9038f
Exists in
master
and in
68 other branches
ENH: Redesign of the __update_display_extent function
Showing
1 changed file
with
7 additions
and
10 deletions
Show diff stats
invesalius/data/viewer_slice.py
... | ... | @@ -492,19 +492,16 @@ class Viewer(wx.Panel): |
492 | 492 | e = self.imagedata.GetWholeExtent() |
493 | 493 | proj = project.Project() |
494 | 494 | |
495 | + x = (pos, pos, e[2], e[3], e[4], e[5]) | |
496 | + y = (e[0], e[1], pos, pos, e[4], e[5]) | |
497 | + z = (e[0], e[1], e[2], e[3], pos, pos) | |
498 | + | |
495 | 499 | if (proj.original_orientation == const.AXIAL): |
496 | - new_extent = {"SAGITAL": (pos, pos, e[2], e[3], e[4], e[5]), | |
497 | - "CORONAL": (e[0], e[1], pos, pos, e[4], e[5]), | |
498 | - "AXIAL": (e[0], e[1], e[2], e[3], pos, pos)} | |
500 | + new_extent = {"SAGITAL": x, "CORONAL": y, "AXIAL": z} | |
499 | 501 | elif(proj.original_orientation == const.SAGITAL): |
500 | - new_extent = {"SAGITAL": (e[0], e[1], e[2], e[3], pos, pos), | |
501 | - "CORONAL": (pos, pos, e[2], e[3], e[4], e[5]), | |
502 | - "AXIAL": (e[0], e[1], pos, pos, e[4], e[5])} | |
502 | + new_extent = {"SAGITAL": z,"CORONAL": x,"AXIAL": y} | |
503 | 503 | elif(proj.original_orientation == const.CORONAL): |
504 | - new_extent = {"SAGITAL": (pos, pos, e[2], e[3], e[4], e[5]), | |
505 | - "CORONAL": (e[0], e[1], e[2], e[3], pos, pos), | |
506 | - "AXIAL": (e[0], e[1], pos, pos, e[4], e[5])} | |
507 | - | |
504 | + new_extent = {"SAGITAL": x,"CORONAL": z,"AXIAL": y} | |
508 | 505 | |
509 | 506 | actor.SetDisplayExtent(new_extent[self.orientation]) |
510 | 507 | render.ResetCameraClippingRange() | ... | ... |