Commit 1e118472c7758c67028bfb45dcec650a51b582a9

Authored by Thiago Franco de Moraes
1 parent ebca14e2
Exists in ffill_gui

Using dynamic as default method to region growing

invesalius/data/styles.py
... ... @@ -1977,7 +1977,7 @@ class FFillSegmentationConfig(object):
1977 1977  
1978 1978 self.fill_value = 254
1979 1979  
1980   - self.method = 'threshold'
  1980 + self.method = 'dynamic'
1981 1981  
1982 1982 self.dev_min = 25
1983 1983 self.dev_max = 25
... ...
invesalius/gui/dialogs.py
... ... @@ -2240,12 +2240,12 @@ class FFillSegmentationOptionsDialog(wx.Dialog):
2240 2240 else:
2241 2241 self.panel3dcon.conect3D_6.SetValue(1)
2242 2242  
2243   - self.cmb_method = wx.ComboBox(self, -1, choices=(_(u"Threshold"), _(u"Dynamic")), style=wx.CB_READONLY)
  2243 + self.cmb_method = wx.ComboBox(self, -1, choices=(_(u"Dynamic"), _(u"Threshold")), style=wx.CB_READONLY)
2244 2244  
2245 2245 if self.config.method == 'dynamic':
2246   - self.cmb_method.SetSelection(1)
2247   - else:
2248 2246 self.cmb_method.SetSelection(0)
  2247 + else:
  2248 + self.cmb_method.SetSelection(1)
2249 2249 self.config.method = 'threshold'
2250 2250  
2251 2251 self.panel_ffill_threshold = PanelFFillThreshold(self, self.config, -1, style=border_style|wx.TAB_TRAVERSAL)
... ... @@ -2277,11 +2277,11 @@ class FFillSegmentationOptionsDialog(wx.Dialog):
2277 2277 sizer.AddStretchSpacer((10, 0))
2278 2278  
2279 2279 if self.config.method == 'dynamic':
2280   - self.cmb_method.SetSelection(1)
  2280 + self.cmb_method.SetSelection(0)
2281 2281 self.panel_ffill_dynamic.Show()
2282 2282 sizer.Add(self.panel_ffill_dynamic, (11, 0), (1, 6), flag=wx.LEFT|wx.RIGHT|wx.EXPAND, border=7)
2283 2283 else:
2284   - self.cmb_method.SetSelection(0)
  2284 + self.cmb_method.SetSelection(1)
2285 2285 self.panel_ffill_threshold.Show()
2286 2286 sizer.Add(self.panel_ffill_threshold, (11, 0), (1, 6), flag=wx.LEFT|wx.RIGHT|wx.EXPAND, border=7)
2287 2287 self.config.method = 'threshold'
... ... @@ -2324,7 +2324,7 @@ class FFillSegmentationOptionsDialog(wx.Dialog):
2324 2324 self.config.con_3d = 26
2325 2325  
2326 2326 def OnSetMethod(self, evt):
2327   - if self.cmb_method.GetSelection() == 1:
  2327 + if self.cmb_method.GetSelection() == 0:
2328 2328 self.config.method = 'dynamic'
2329 2329 self.panel_ffill_threshold.Hide()
2330 2330 self.panel_ffill_dynamic.Show()
... ...