From 11dc8fd7ecbeaa3ba52e93e43d0129457bc689b5 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Tue, 22 Sep 2015 10:16:20 -0300 Subject: [PATCH] Giving the user the option to choose the n steps to whitaker alg --- invesalius/data/surface.py | 2 +- invesalius/gui/dialogs.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index d946f63..9def587 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -469,7 +469,7 @@ class SurfaceManager(): q_out = multiprocessing.Queue() if algorithm == 'Whitaker': - iteractions = 10 + iteractions = options['steps'] bsize = 4 mask_tfile = tempfile.mktemp() diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 9c4a75e..c7e788b 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -1304,6 +1304,12 @@ class SurfaceMethodPanel(wx.Panel): def _set_cb_types(self, evt): if self.alg_types[evt.GetString()] == 'ca_smoothing': self.ca_options.Enable() + elif self.alg_types[evt.GetString()] == 'Whitaker': + self.ca_options.Enable() + self.ca_options.angle.Disable() + self.ca_options.max_distance.Disable() + self.ca_options.min_weight.Disable() + self.ca_options.steps.Enable() else: self.ca_options.Disable() evt.Skip() @@ -1320,6 +1326,8 @@ class SurfaceMethodPanel(wx.Panel): 'max distance': self.ca_options.max_distance.GetValue(), 'min weight': self.ca_options.min_weight.GetValue(), 'steps': self.ca_options.steps.GetValue()} + elif self.GetAlgorithmSelected() == 'Whitaker': + options = {'steps': self.ca_options.steps.GetValue()} else: options = {} return options -- libgit2 0.21.2