diff --git a/invesalius/constants.py b/invesalius/constants.py index 156c029..d15a9a8 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -65,6 +65,9 @@ ORIENTATION_COLOUR = {'AXIAL': (1,0,0), # Red 'CORONAL': (0,1,0), # Green 'SAGITAL': (0,0,1)} # Blue +IMPORT_INTERVAL = [_("Keep all slices"), _("Skip 1 for each 2 slices"), + _("Skip 1 for each 3 slices")] + # Camera according to slice's orientation #CAM_POSITION = {"AXIAL":(0, 0, 1), "CORONAL":(0, -1, 0), "SAGITAL":(1, 0, 0)} #CAM_VIEW_UP = {"AXIAL":(0, 1, 0), "CORONAL":(0, 0, 1), "SAGITAL":(0, 0, 1)} diff --git a/invesalius/gui/import_panel.py b/invesalius/gui/import_panel.py index 4e86b78..2a6864b 100644 --- a/invesalius/gui/import_panel.py +++ b/invesalius/gui/import_panel.py @@ -21,6 +21,7 @@ import wx.gizmos as gizmos import wx.lib.pubsub as ps import wx.lib.splitter as spl +import constants as const import dicom_preview_panel as dpp import reader.dicom_grouper as dcm @@ -79,15 +80,31 @@ class InnerPanel(wx.Panel): self.splitter = splitter panel = wx.Panel(self) - button = wx.Button(panel, -1, _("Import medical images"), (20, 20)) + #button = wx.Button(panel, -1, _("Import medical images"), (20, 20)) - inner_sizer = wx.BoxSizer() - inner_sizer.Add(button, 0, wx.ALIGN_CENTER_HORIZONTAL, 40) + + btn_ok = wx.Button(panel, wx.ID_OK) + btn_ok.SetDefault() + btn_cancel = wx.Button(panel, wx.ID_CANCEL) + + btnsizer = wx.StdDialogButtonSizer() + btnsizer.AddButton(btn_ok) + btnsizer.AddButton(btn_cancel) + btnsizer.Realize() + + combo_interval = wx.ComboBox(panel, -1, "", choices= const.IMPORT_INTERVAL, + style=wx.CB_DROPDOWN|wx.CB_READONLY) + combo_interval.SetSelection(0) + + inner_sizer = wx.BoxSizer(wx.HORIZONTAL) + inner_sizer.AddSizer(btnsizer, 0, wx.LEFT|wx.TOP, 5) + inner_sizer.Add(combo_interval, 0, wx.LEFT|wx.RIGHT|wx.TOP, 8) panel.SetSizer(inner_sizer) + inner_sizer.Fit(panel) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(splitter, 20, wx.EXPAND) - sizer.Add(panel, 1, wx.EXPAND) + sizer.Add(panel, 1, wx.EXPAND|wx.LEFT, 90) self.SetSizer(sizer) sizer.Fit(self) -- libgit2 0.21.2