diff options
author | Daniil Kazantsev <dkazanc3@googlemail.com> | 2018-04-16 15:29:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-16 15:29:57 +0100 |
commit | 3d17b516f269921f5c8fb4eb54cec49f732e27d5 (patch) | |
tree | b6dd09825750854bf6c87cee8e544c2278ac5586 /Wrappers/Python/ccpi | |
parent | 7ae26b005c5f3d9ca0181ab1cf06b6ee8df5ed69 (diff) | |
parent | 57727584760e6b1a980071587e1f1e8910c7d6a3 (diff) | |
download | regularization-3d17b516f269921f5c8fb4eb54cec49f732e27d5.tar.gz regularization-3d17b516f269921f5c8fb4eb54cec49f732e27d5.tar.bz2 regularization-3d17b516f269921f5c8fb4eb54cec49f732e27d5.tar.xz regularization-3d17b516f269921f5c8fb4eb54cec49f732e27d5.zip |
Merge pull request #50 from vais-ral/SB_TV
Split Bregman method
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r-- | Wrappers/Python/ccpi/filters/regularisers.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/filters/regularisers.py b/Wrappers/Python/ccpi/filters/regularisers.py index 376cc9c..50c4374 100644 --- a/Wrappers/Python/ccpi/filters/regularisers.py +++ b/Wrappers/Python/ccpi/filters/regularisers.py @@ -2,8 +2,8 @@ script which assigns a proper device core function based on a flag ('cpu' or 'gpu') """ -from ccpi.filters.cpu_regularisers_cython import TV_ROF_CPU, TV_FGP_CPU, dTV_FGP_CPU -from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU, dTV_FGP_GPU +from ccpi.filters.cpu_regularisers_cython import TV_ROF_CPU, TV_FGP_CPU, TV_SB_CPU, dTV_FGP_CPU +from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU, TV_SB_GPU, dTV_FGP_GPU def ROF_TV(inputData, regularisation_parameter, iterations, time_marching_parameter,device='cpu'): @@ -42,6 +42,25 @@ def FGP_TV(inputData, regularisation_parameter,iterations, else: raise ValueError('Unknown device {0}. Expecting gpu or cpu'\ .format(device)) +def SB_TV(inputData, regularisation_parameter, iterations, + tolerance_param, methodTV, printM, device='cpu'): + if device == 'cpu': + return TV_SB_CPU(inputData, + regularisation_parameter, + iterations, + tolerance_param, + methodTV, + printM) + elif device == 'gpu': + return TV_SB_GPU(inputData, + regularisation_parameter, + iterations, + tolerance_param, + methodTV, + printM) + else: + raise ValueError('Unknown device {0}. Expecting gpu or cpu'\ + .format(device)) def FGP_dTV(inputData, refdata, regularisation_parameter, iterations, tolerance_param, eta_const, methodTV, nonneg, printM, device='cpu'): if device == 'cpu': |