Commit 5ac92d4f51bf540f0dd056c79172ba0301edaf7b

Authored by Thiago Franco de Moraes
1 parent aa28a9ba
Exists in smoothing_bin_pll

Giving the user the option to choose the n steps to whitaker alg

invesalius/data/surface.py
... ... @@ -469,7 +469,7 @@ class SurfaceManager():
469 469 q_out = multiprocessing.Queue()
470 470  
471 471 if algorithm == 'Whitaker':
472   - iteractions = 10
  472 + iteractions = options['steps']
473 473 bsize = 4
474 474 mask_tfile = tempfile.mktemp()
475 475  
... ...
invesalius/gui/dialogs.py
... ... @@ -1356,6 +1356,12 @@ class SurfaceMethodPanel(wx.Panel):
1356 1356 def _set_cb_types(self, evt):
1357 1357 if self.alg_types[evt.GetString()] == 'ca_smoothing':
1358 1358 self.ca_options.Enable()
  1359 + elif self.alg_types[evt.GetString()] == 'Whitaker':
  1360 + self.ca_options.Enable()
  1361 + self.ca_options.angle.Disable()
  1362 + self.ca_options.max_distance.Disable()
  1363 + self.ca_options.min_weight.Disable()
  1364 + self.ca_options.steps.Enable()
1359 1365 else:
1360 1366 self.ca_options.Disable()
1361 1367 evt.Skip()
... ... @@ -1372,6 +1378,8 @@ class SurfaceMethodPanel(wx.Panel):
1372 1378 'max distance': self.ca_options.max_distance.GetValue(),
1373 1379 'min weight': self.ca_options.min_weight.GetValue(),
1374 1380 'steps': self.ca_options.steps.GetValue()}
  1381 + elif self.GetAlgorithmSelected() == 'Whitaker':
  1382 + options = {'steps': self.ca_options.steps.GetValue()}
1375 1383 else:
1376 1384 options = {}
1377 1385 return options
... ...