Commit 11dc8fd7ecbeaa3ba52e93e43d0129457bc689b5

Authored by Thiago Franco de Moraes
1 parent 1b2d6034
Exists in smoothing_bin

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
... ... @@ -1304,6 +1304,12 @@ class SurfaceMethodPanel(wx.Panel):
1304 1304 def _set_cb_types(self, evt):
1305 1305 if self.alg_types[evt.GetString()] == 'ca_smoothing':
1306 1306 self.ca_options.Enable()
  1307 + elif self.alg_types[evt.GetString()] == 'Whitaker':
  1308 + self.ca_options.Enable()
  1309 + self.ca_options.angle.Disable()
  1310 + self.ca_options.max_distance.Disable()
  1311 + self.ca_options.min_weight.Disable()
  1312 + self.ca_options.steps.Enable()
1307 1313 else:
1308 1314 self.ca_options.Disable()
1309 1315 evt.Skip()
... ... @@ -1320,6 +1326,8 @@ class SurfaceMethodPanel(wx.Panel):
1320 1326 'max distance': self.ca_options.max_distance.GetValue(),
1321 1327 'min weight': self.ca_options.min_weight.GetValue(),
1322 1328 'steps': self.ca_options.steps.GetValue()}
  1329 + elif self.GetAlgorithmSelected() == 'Whitaker':
  1330 + options = {'steps': self.ca_options.steps.GetValue()}
1323 1331 else:
1324 1332 options = {}
1325 1333 return options
... ...