Commit aac9c64c authored by Taylor Hanayik's avatar Taylor Hanayik
Browse files

minor changes

parent 600968dd
......@@ -205,9 +205,9 @@ class FlirtGui(BaseGui):
if 'low res' in choice_str:
self.view.input_lowres.set_label("Low res image*")
self.view.input_lowres.Show()
self.view.input_img.set_label("High res image*")
self.view.input.set_label("High res image*")
self._layout_from(self.view.input_lowres)
else:
self.view.input_img.set_label("Input image*")
self.view.input.set_label("Input image*")
self.view.input_lowres.Hide()
self._layout_from(self.view.input_lowres)
\ No newline at end of file
"""
models store data and allow FSL tools to be called from other python scripts
tools are models that store data and allow FSL tools to be called from other python scripts
"""
#!/usr/bin/env python
#
......@@ -317,4 +317,4 @@ class Flirt(object):
search_zmin=-90,
search_zmax=90
):
pass
\ No newline at end of file
pass
......@@ -93,6 +93,68 @@ class BetOptions(wx.CollapsiblePane):
sizer.Add(self.coord_panel, 0, wx.ALL, 0)
# now layout the widgets so they can be sized appropriately (automatically done by wx)
pane.SetSizer(sizer)
class FlirtOptions(wx.CollapsiblePane):
"""
FlirtOptions is a collapsible pane containing widgets that control
flirt's operation.
add the Options pane to a parent's sizer with a proportion value of 0.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
pane = self.GetPane()
sizer = wx.BoxSizer(wx.VERTICAL)
# the dropdown choices for the bet mode
self.search_panel = wx.Panel(pane)
search_sizer = wx.BoxSizer(wx.VERTICAL)
self.search_ch_panel = wx.Panel(self.search_panel)
search_ch_sizer = wx.BoxSizer(wx.HORIZONTAL)
self.search_choice_label = wx.StaticText(self.search_panel, label="Search config")
self.choice_stype = wx.Choice(self.search_panel, choices=[])
self.choice_stype.SetSelection(0)
search_ch_sizer.Add(self.search_choice_label, 0, wx.ALL, 5)
search_ch_sizer.Add(self.choice_stype, 0, wx.ALL, 5)
self.search_ch_panel.SetSizer(search_ch_sizer)
search_sizer.Add(self.search_ch_panel, 0, wx.ALL, 5)
self.search_panel.SetSizer(search_sizer)
# the bet center coordinates
self.coord_panel = wx.Panel(pane)
self.coord_panel.sizer = wx.BoxSizer(wx.HORIZONTAL)
self.coordx = wx.SpinCtrlDouble(self.coord_panel, min=0, max=10000, initial=0, inc=1)
self.coordy = wx.SpinCtrlDouble(self.coord_panel, min=0, max=10000, initial=0, inc=1)
self.coordz = wx.SpinCtrlDouble(self.coord_panel, min=0, max=10000, initial=0, inc=1)
self.label_coordstr = wx.StaticText(self.coord_panel, label="Center point: ")
self.labelx = wx.StaticText(self.coord_panel, label="X ")
self.labely = wx.StaticText(self.coord_panel, label="Y ")
self.labelz = wx.StaticText(self.coord_panel, label="Z ")
self.coord_panel.sizer.Add(self.label_coordstr, 0, wx.ALL, 5)
self.coord_panel.sizer.Add(self.labelx, 0, wx.ALL, 5)
self.coord_panel.sizer.Add(self.coordx, 0, wx.ALL, 5)
self.coord_panel.sizer.Add(self.labely, 0, wx.ALL, 5)
self.coord_panel.sizer.Add(self.coordy, 0, wx.ALL, 5)
self.coord_panel.sizer.Add(self.labelz, 0, wx.ALL, 5)
self.coord_panel.sizer.Add(self.coordz, 0, wx.ALL, 5)
self.coord_panel.SetSizer(self.coord_panel.sizer)
# now add all of the options widgets to the sizer
sizer.Add(self.fval_panel, 0, wx.ALL, 0) # 0 pixel border since the fval_panel already applied a 5 pix border
sizer.Add(self.bet_choice_panel, 0, wx.ALL, 0)
sizer.Add(self.cb_save_bet, 0, wx.ALL, 5)
sizer.Add(self.cb_save_mask, 0, wx.ALL, 5)
sizer.Add(self.cb_apply_thr, 0, wx.ALL, 5)
sizer.Add(self.cb_save_skull, 0, wx.ALL, 5)
sizer.Add(self.cb_save_overlay, 0, wx.ALL, 5)
sizer.Add(self.cb_verbose, 0, wx.ALL, 5)
sizer.Add(self.gval_panel, 0, wx.ALL, 0)
sizer.Add(self.coord_panel, 0, wx.ALL, 0)
# now layout the widgets so they can be sized appropriately (automatically done by wx)
pane.SetSizer(sizer)
......@@ -139,6 +201,15 @@ class BetView(wx.Panel):
self.SetSizer(sizer)
class PnmView(wx.Panel):
"""
PnmView defines the graphical layout of widgets for the PNM gui
"""
def __init__(self, parent, title="PNM"):
super().__init__(parent)
sizer = wx.BoxSizer(wx.VERTICAL)
class FlirtView(wx.Panel):
"""
FlirtView defines the graphical layout of widgets used in Flirt
......@@ -171,8 +242,8 @@ class FlirtView(wx.Panel):
self.input_lowres.Hide()
# high res input panel
self.input_img = fslwidgets.Input(self).set_label("Input image*")
sizer.Add(self.input_img, proportion=0, flag=wx.EXPAND | wx.ALL, border=5)
self.input = fslwidgets.Input(self).set_label("Input image*")
sizer.Add(self.input, proportion=0, flag=wx.EXPAND | wx.ALL, border=5)
# reference image picker panel
self.input_reference = fslwidgets.ReferencePicker(self).set_label("Reference image*")
......@@ -182,8 +253,9 @@ class FlirtView(wx.Panel):
#TODO enable this later
# self.secondary_image_panel = fslwidgets.SecondaryImageInput(self, "")
# sizer.Add(self.secondary_image_panel, proportion=0, flag=wx.ALL | wx.EXPAND, border=5)
self.output = fslwidgets.Output(self, label="Output image*")
sizer.Add(self.output, proportion=0, flag=wx.EXPAND | wx.ALL, border=5)
# lastly set the sizer with all widgets added
self.SetSizer(sizer)
......
......@@ -255,10 +255,10 @@ class ReferencePicker(wx.Panel):
class Output(wx.Panel):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __init__(self, parent, label=""):
wx.Panel.__init__(self, parent)
self.file_path = ""
self.box = wx.StaticBox(self, label="")
self.box = wx.StaticBox(self, label=label)
sizer = wx.StaticBoxSizer(self.box)
self.button = wx.Button(self.box, label="Set path")
self.file_ctrl = wx.TextCtrl(self.box, value="")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment