diff options
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r-- | Wrappers/Python/ccpi/filters/Regularizer.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Wrappers/Python/ccpi/filters/Regularizer.py b/Wrappers/Python/ccpi/filters/Regularizer.py index 8623f41..b9f12ca 100644 --- a/Wrappers/Python/ccpi/filters/Regularizer.py +++ b/Wrappers/Python/ccpi/filters/Regularizer.py @@ -251,7 +251,9 @@ class Regularizer(): def SplitBregman_TV(input, regularization_parameter , **kwargs): start_time = timeit.default_timer() reg = Regularizer(Regularizer.Algorithm.SplitBregman_TV) - out = list( reg(input, regularization_parameter, **kwargs) ) + out = [] + a = reg(input, regularization_parameter, **kwargs) + out.append(a) out.append(reg.pars) txt = reg.printParametersToString() txt += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time) @@ -262,7 +264,9 @@ class Regularizer(): def FGP_TV(input, regularization_parameter , **kwargs): start_time = timeit.default_timer() reg = Regularizer(Regularizer.Algorithm.FGP_TV) - out = list( reg(input, regularization_parameter, **kwargs) ) + out = [] + a = reg(input, regularization_parameter, **kwargs) + out.append(a) out.append(reg.pars) txt = reg.printParametersToString() txt += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time) @@ -274,10 +278,13 @@ class Regularizer(): tolerance_constant, restrictive_Z_smoothing=0): start_time = timeit.default_timer() reg = Regularizer(Regularizer.Algorithm.LLT_model) - out = list( reg(input, regularization_parameter, time_step=time_step, + out = [] + a = reg(input, regularization_parameter, time_step=time_step, number_of_iterations=number_of_iterations, tolerance_constant=tolerance_constant, - restrictive_Z_smoothing=restrictive_Z_smoothing) ) + restrictive_Z_smoothing=restrictive_Z_smoothing) + + out.append(a) out.append(reg.pars) txt = reg.printParametersToString() txt += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time) @@ -291,12 +298,13 @@ class Regularizer(): PB_filtering_parameter): start_time = timeit.default_timer() reg = Regularizer(Regularizer.Algorithm.PatchBased_Regul) - out = list( reg(input, + out = [] + a = reg(input, regularization_parameter, searching_window_ratio=searching_window_ratio, similarity_window_ratio=similarity_window_ratio, PB_filtering_parameter=PB_filtering_parameter ) - ) + out.append(a) out.append(reg.pars) txt = reg.printParametersToString() txt += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time) @@ -309,10 +317,12 @@ class Regularizer(): start_time = timeit.default_timer() reg = Regularizer(Regularizer.Algorithm.TGV_PD) - out = list( reg(input, regularization_parameter, + a = reg(input, regularization_parameter, first_order_term=first_order_term, second_order_term=second_order_term, - number_of_iterations=number_of_iterations) ) + number_of_iterations=number_of_iterations) + out = [] + out.append(a) out.append(reg.pars) txt = reg.printParametersToString() txt += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time) |