diff options
author | Daniil Kazantsev <dkazanc3@googlemail.com> | 2018-04-12 12:09:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 12:09:38 +0100 |
commit | 7ae26b005c5f3d9ca0181ab1cf06b6ee8df5ed69 (patch) | |
tree | 225dcf0db9dc7e0f0fc5fc001a7efb14c19658f8 /Wrappers/Python/ccpi | |
parent | aa99eb8a9bd47ecd6e4d3d1e8c9f0cfbefb4f7bb (diff) | |
parent | 22f6e22cbe6db04c6bbe8d259ce761e3748d7102 (diff) | |
download | regularization-7ae26b005c5f3d9ca0181ab1cf06b6ee8df5ed69.tar.gz regularization-7ae26b005c5f3d9ca0181ab1cf06b6ee8df5ed69.tar.bz2 regularization-7ae26b005c5f3d9ca0181ab1cf06b6ee8df5ed69.tar.xz regularization-7ae26b005c5f3d9ca0181ab1cf06b6ee8df5ed69.zip |
Merge pull request #49 from vais-ral/dTV
dTV regulariser (2D/3D CPU/GPU)
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r-- | Wrappers/Python/ccpi/filters/regularisers.py | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/filters/regularisers.py b/Wrappers/Python/ccpi/filters/regularisers.py index 039daab..376cc9c 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 -from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_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 def ROF_TV(inputData, regularisation_parameter, iterations, time_marching_parameter,device='cpu'): @@ -42,3 +42,28 @@ def FGP_TV(inputData, regularisation_parameter,iterations, 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': + return dTV_FGP_CPU(inputData, + refdata, + regularisation_parameter, + iterations, + tolerance_param, + eta_const, + methodTV, + nonneg, + printM) + elif device == 'gpu': + return dTV_FGP_GPU(inputData, + refdata, + regularisation_parameter, + iterations, + tolerance_param, + eta_const, + methodTV, + nonneg, + printM) + else: + raise ValueError('Unknown device {0}. Expecting gpu or cpu'\ + .format(device)) |