Commit d5007efdab7a47eb2b1ea73f9a445c4ff3cab615
1 parent
828f2a21
Exists in
master
and in
10 other branches
Added tool to flip and swap axes
Showing
1 changed file
with
18 additions
and
23 deletions
Show diff stats
invesalius/gui/frame.py
... | ... | @@ -716,26 +716,7 @@ class MenuBar(wx.MenuBar): |
716 | 716 | #file_menu.AppendSeparator() |
717 | 717 | app(const.ID_EXIT, _("Exit\tCtrl+Q")) |
718 | 718 | |
719 | - | |
720 | - ############################### EDIT############################### | |
721 | - # Flip | |
722 | - #flip_menu = wx.Menu() | |
723 | - #app = flip_menu.Append | |
724 | - #app(const.ID_FLIP_X, _("R <-> L")) | |
725 | - #app(const.ID_FLIP_Y, _("A <-> P")) | |
726 | - #app(const.ID_FLIP_Z, _("T <-> B")) | |
727 | - | |
728 | - #swap_axes_menu = wx.Menu() | |
729 | - #app = swap_axes_menu.Append | |
730 | - #app(const.ID_SWAP_XY, _("R-L <-> A-P")) | |
731 | - #app(const.ID_SWAP_XZ, _("R-L <-> T-B")) | |
732 | - #app(const.ID_SWAP_YZ, _("A-P <-> T-B")) | |
733 | - | |
734 | 719 | file_edit = wx.Menu() |
735 | - #file_edit.AppendMenu(wx.NewId(), _('Flip'), flip_menu) | |
736 | - #file_edit.AppendMenu(wx.NewId(), _('Swap axes'), swap_axes_menu) | |
737 | - | |
738 | - | |
739 | 720 | d = const.ICON_DIR |
740 | 721 | if not(sys.platform == 'darwin'): |
741 | 722 | # Bitmaps for show/hide task panel item |
... | ... | @@ -792,20 +773,34 @@ class MenuBar(wx.MenuBar): |
792 | 773 | self.crop_mask_menu = mask_menu.Append(const.ID_CROP_MASK, _("Crop")) |
793 | 774 | self.crop_mask_menu.Enable(False) |
794 | 775 | |
795 | - tools_menu.AppendMenu(-1, _(u"Mask"), mask_menu) | |
796 | - | |
797 | 776 | # Segmentation Menu |
798 | 777 | segmentation_menu = wx.Menu() |
799 | 778 | self.ffill_segmentation = segmentation_menu.Append(const.ID_FLOODFILL_SEGMENTATION, _(u"Region growing")) |
800 | 779 | self.ffill_segmentation.Enable(False) |
801 | 780 | |
802 | - tools_menu.AppendMenu(-1, _("Segmentation"), segmentation_menu) | |
803 | - | |
804 | 781 | # Image menu |
805 | 782 | image_menu = wx.Menu() |
783 | + | |
784 | + # Flip | |
785 | + flip_menu = wx.Menu() | |
786 | + flip_menu.Append(const.ID_FLIP_X, _("Right - Left")) | |
787 | + flip_menu.Append(const.ID_FLIP_Y, _("Anterior - Posterior")) | |
788 | + flip_menu.Append(const.ID_FLIP_Z, _("Top - Bottom")) | |
789 | + | |
790 | + swap_axes_menu = wx.Menu() | |
791 | + swap_axes_menu.Append(const.ID_SWAP_XY, _("From Right-Left to Anterior-Posterior")) | |
792 | + swap_axes_menu.Append(const.ID_SWAP_XZ, _("From Right-Left to Top-Bottom")) | |
793 | + swap_axes_menu.Append(const.ID_SWAP_YZ, _("From Anterior-Posterior to Top-Bottom")) | |
794 | + | |
795 | + image_menu.AppendMenu(wx.NewId(), _('Flip'), flip_menu) | |
796 | + image_menu.AppendMenu(wx.NewId(), _('Swap axes'), swap_axes_menu) | |
797 | + | |
806 | 798 | reorient_menu = image_menu.Append(const.ID_REORIENT_IMG, _(u'Reorient image\tCtrl+Shift+R')) |
799 | + | |
807 | 800 | reorient_menu.Enable(False) |
808 | 801 | tools_menu.AppendMenu(-1, _(u'Image'), image_menu) |
802 | + tools_menu.AppendMenu(-1, _(u"Mask"), mask_menu) | |
803 | + tools_menu.AppendMenu(-1, _("Segmentation"), segmentation_menu) | |
809 | 804 | |
810 | 805 | |
811 | 806 | #View | ... | ... |